salt-bootstrap
salt-bootstrap copied to clipboard
How to uninstall salt which was installed with this boostrap script
Description of Issue/Question
How can I fully uninstall / undo this boostrap install? e.g. If I'd like to switch to the salt-packages that come with my distribution (apt get install ....)
by default the bootstrap script just installs the packages from the official repo, https://repo.saltstack.com
You should be able to
apt-key list
note the gpg key for the salt repo
sudo apt-key del [that key fingerprint]
sudo rm /etc/apt/sources.list.d/saltstack.list
sudo apt update
apt list --installed|grep salt
then remove the installed salt packages, which would typically be
sudo apt autoremove salt-common salt-minion
Then you can install the distro provided packages.
If you install from git or pip with the bootstrap script, it's another story.
Hm, in fact, I installed it from GIT. But doesn't the bootstrap script uninstall existing versions before installing the new one (AFAIK logs telling this) ?
Could a new commandline-parameter for "uninstall only" be introduced?
I was able to fix my corrupted salt installation as follows:
- Switch to the repo packages:
sudo sh bootstrap-salt.sh -M
- Remove salt packages using
apt
- Find and remove remaining (locally complied) salt binaries:
which salt
...
Feature Request - might be useful? not sure what all that would entail to implement. uninstalling 'git' based installs could get complicated as there could be differences between salt versions. Pip and Apt based installs should be relatively simple - query whether the pip or system pkgs are installed and then uninstall them using the package manager. can Salt 'un-Salt' itself? :smile:
This issue is related to https://github.com/saltstack/salt-bootstrap/issues/1492