chris
(Chris Dellaway)
5
Hi @Alex_Chen1
Looking at the prerm script for mongodb-server(/var/lib/dpkg/info/mongodb-server.prerm) it might not be shutting down mongod on the apt autoremove if you are using systemd. You can check that with pidof mongod, pgrep mongod or whatever other method you can think of. So a safety step might be systemctl stop mongodb before the removal/purge steps.
From the manual installation troubleshooting:
sudo apt remove mongodb
sudo apt purge mongodb
sudo apt autoremove
If you have got a mix of ubuntu repo and mongodb-org:
If your output includes a mix of mongodb-org and mongodb binaries, you may need to first apt remove, apt purge, and apt autoremove the mongodb-org package before attempting to remove and purge the Ubuntu mongodb package. After clearing all MongoDB-related packages, retry the installation procedure.
1 Like