MongoDB Upgrading MongoDB version Upgrading to 3.4 on Ubuntu 16.04 using apt


You must have 3.2 to be able to upgrade to 3.4. This example assumes you are using apt.

  1. sudo service mongod stop
  2. sudo apt-key adv --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6
  3. echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
  4. sudo apt-get update
  5. sudo apt-get upgrade
  6. sudo service mongod start

Ensure the new version is running with mongo. The shell will print out the MongoDB server version that should be 3.4 now.