While installing npme
handles the installation of dependencies, uninstalling npme
does not uninstall its dependencies. Here's a quick guide to uninstall and remove the different components that make up the Enterprise product.
-
Uninstall the
npme
packagesudo npm uninstall -g npme
-
Note storage paths in admin console settings
If you wish to remove all packages and data from your registry, please make a note of all the Storage paths you have configured for your instance at
https://<your-server>:8800/settings
.The default root is
/usr/local/lib/npme
. You can remove these in step 6 below. -
Uninstall the orchestration layer
To uninstall and remove Replicated, please follow the instructions found here.
Ubuntu/Debian:
sudo service replicated stop sudo service replicated-ui stop sudo service replicated-operator stop sudo docker rm -f replicated replicated-ui replicated-operator sudo docker images | grep "quay\.io/replicated" | awk '{print $3}' | xargs sudo docker rmi -f sudo apt-get remove -y replicated replicated-ui replicated-operator sudo apt-get purge -y replicated replicated-ui replicated-operator sudo rm -rf /var/lib/replicated* /etc/replicated* /etc/init/replicated* /etc/init.d/replicated* /etc/default/replicated* /var/log/upstart/replicated* /etc/systemd/system/replicated*
CentOS/RHEL:
sudo systemctl stop replicated replicated-ui replicated-operator sudo service replicated stop sudo service replicated-ui stop sudo service replicated-operator stop sudo docker rm -f replicated replicated-ui replicated-operator sudo docker images | grep "quay\.io/replicated" | awk '{print $3}' | xargs sudo docker rmi -f sudo yum remove -y replicated replicated-ui replicated-operator sudo rm -rf /var/lib/replicated* /etc/replicated* /etc/init/replicated* /etc/default/replicated* /etc/systemd/system/replicated*
-
Stop and remove all Docker containers and images
Assuming you are not using Docker for anything else on your server, you may remove all running Docker containers and images with the following commands:
# stop all containers sudo docker stop $(sudo docker ps -aq) # remove all containers sudo docker rm $(sudo docker ps -aq) # remove all images sudo docker rmi -f $(sudo docker images -q)
-
Optionally uninstall Docker
If you wish, you may also remove Docker itself. Use the instructions for your Linux distribution:
Ubuntu/Debian instructions, sample:
sudo apt-get autoremove --purge docker-engine sudo rm -rf /var/lib/docker
CentOS/RHEL instructions, sample:
sudo yum -y remove docker-engine sudo rm -rf /var/lib/docker
-
Optionally remove packages and Enterprise data
To completely wipe the Enterprise data, you should also remove the directories noted from step 2. Note that this will remove all packages you have published thus far!
# caution! make sure the directory below is correct # caution! this will remove all published packages sudo rm -r /usr/local/lib/npme
-
Optionally uninstall Node.js and npm
Assuming you do not need Node.js or npm for anything else on your server, you may uninstall them via the system package manager you used to install Node.js.
Ubuntu/Debian:
sudo apt-get autoremove --purge nodejs
CentOS/RHEL:
sudo yum -y remove nodejs
This should remove all traces of npm Enterprise from your server.
Follow the same steps as outlined in the quickstart guide.
-
Reinstall Node.js and npm
Ubuntu/Debian:
sudo apt-get install -y nodejs sudo npm i -g npm@latest
CentOS/RHEL:
sudo yum -y install nodejs sudo npm i -g npm@latest
-
Install
npme
sudo npm install npme -g --unsafe
Answer any prompts and wait for the installer to complete.
Once it's done, verify
docker
andreplicated
daemons are running:sudo ps aux | grep -e docker -e replicated sudo docker ps -a replicated nodes
-
Complete installation via admin web console
Use the admin web console at
https://<your-server>:8800
to complete the installation and configure your instance. -
Wait for the services to start
-
Check for error on startup
On reinstallation, it's possible that the node used by Replicated may not be provisioned correctly, in which case you will receive an error on initial start of the appliance.
To fix this, check the "Connected" and "Initialized" status of the single node under the Cluster page at
https://<your-server>:8800/cluster
.If they do not show as green/checked, then you will need to manually reset the node via the following CLI commands:
# login with same credentials of admin web console sudo replicated login # get the app node name sudo replicated nodes # remove the host sudo replicated node rm <node-id>
Next, visit the Cluster page again in the UI and click "Add Node".
Select "Install Manually".
Copy the displayed command:
Run it in your SSH terminal. Note that the
private_ip
variable argument can be omitted.curl -sSL https://get.replicated.com/operator | sudo sh -s daemon-endpoint=<ip_from_ui>:9879 daemon-token=<token_from_ui> private-address=<ip_from_ui> public-address=<ip_from_ui>
Then check the state of the node in the UI. It should now be connected and initialized.
Start the registry services by going to the Dashboard and hitting the "Start Now" button.
Once the services are up, verify a healthy node on the Cluster page.
You are good to go! You can now configure your CLI client and start using your Enterprise registry!