Resetting a Cardano Node Installation
If you are unable to troubleshoot an instance of Cardano Node sucessfully, then removing source, binary, service and shared library files, as well as backing up configuration and key files, allows you to work through the How to Set Up a Cardano Stake Pool guide again from the beginning.
To reset an instance of Cardano Node:
- If you are resetting the block-producing node or a relay node in your stake pool configuration, then type the following commands using a terminal window on the computer that you want to reset:# Ensure that the Cardano Node systemd service is not runningsudo systemctl stop cardano-node# Remove source files related to Cardano Noderm -rf $HOME/git/cardano-node/ $HOME/git/libsodium/ $HOME/git/secp256k1 $HOME/git/blst# Remove the systemd service file that manages Cardano Nodesudo rm /etc/systemd/system/cardano-node.servicesudo rm /etc/systemd/system/cardano-tracer.servicesudo rm /etc/systemd/system/slot-leadership.service# Reload systemd configurationsudo systemctl daemon-reload
- Using a terminal window on the computer that you want to reset, type:# Remove binaries related to Cardano Nodesudo rm /usr/local/bin/cardano-node /usr/local/bin/cardano-cli /usr/local/bin/cardano-tracer# Remove the Sodium librarysudo rm /usr/local/lib/libsodium* /usr/local/lib/pkgconfig/libsodium.pc /usr/local/include/sodium.hsudo rm -r /usr/local/include/sodium# Remove the libsecp256k1 librarysudo rm /usr/local/lib/libsecp256k1* /usr/local/lib/pkgconfig/libsecp256k1.pc /usr/local/include/secp256k1*# Remove the blst librarysudo rm /usr/local/lib/libblst.a /usr/local/lib/pkgconfig/libblst.pc /usr/local/include/blst*# Update available symbolic links for currently shared librariessudo ldconfig# Move files and scripts related to Cardano Node to a new foldermv $NODE_HOME $(basename $NODE_HOME)_backup_$(date -I)
- If you are resetting the block-producing node in your stake pool configuration, then type the following command using a terminal window on the air-gapped, offline computer:# Move keys for the stake pool to a new foldermv $HOME/cold-keys $HOME/cold-keys_backup_$(date -I)
Important

Do NOT delete the keys for a Cardano stake pool.