Skip to content

Instantly share code, notes, and snippets.

@elhenro
Created June 19, 2018 18:13
Show Gist options
  • Save elhenro/319e0dcc516774d126d6ea8e09a14c97 to your computer and use it in GitHub Desktop.
Save elhenro/319e0dcc516774d126d6ea8e09a14c97 to your computer and use it in GitHub Desktop.
# attention: this will delete all databases and everything mongodb related
# intended to fix a not starting mongoDb installation on ubuntu > 18.04
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt update
sudo apt-get install -y mongodb-org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment