How to upgrade MongoDB (2.4 to 2.6) on Ubuntu 14.04

Since I’ve installed MongoDB per this procedure:

Which did:

apt-get install mongodb-server

I’m curious about the proper upgrade procedure. says this:

apt-get install mongodb-org

Should the old be removed and the new installed or will “apt-get install mongodb-org” handle all of that?

NOTE: I’ve even tried apt-get upgrade mongo-server which tells me I’m at the latest version (2.4.9). Is it possible I need to add a new/different apt-get package repository for mongo 2.6?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The instructions in that tutorial will install MongoDB from the regular Ubuntu repository. In order to provide a stable environment, Ubuntu and other distros release with a specific versions of software. Often they will provide backported security patches and bugfixes, but they will not ship new major releases.

You can install a more recent version of MongoDB using upstream’s repository:

sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10
echo 'deb dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org

Installing the mongodb-org packages will automatically remove the Ubuntu mongodb-server ones.