Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following this guide: I ended up with mongodb 18 on my Ubuntu 10.04.

I've just read the 2.2 mongodb release notes on upgrading and it says to just replace the binary. Would that be /usr/lib/mongodb/mongod ?

It looks like the 2.2 tar has several files I might need to copy over: mongo, mongod, mongoexport, mongodump, mongofiles, mongoimport, mongorestore, mongos, xulwrapper

Can I just copy and paste all of those over to replace the old versions of those files?

share|improve this question
Yes, you can do that. – Jeff Ferland Nov 28 '12 at 18:33
up vote 1 down vote accepted

You can overwrite the MongoDB binaries, that will work fine

However, there is no possible way you installed version 1.2.2 - that version is not available on the repositories mentioned in the installation instructions (and it is ancient - from Jan 2010) - the only versions are 1.8, 2.0 and 2.2.

You may be confusing it with a driver version - PHP maybe?

If you run /usr/lib/mongodb/mongod --version it will tell you the version of mongod that is actually installed.

If you installed one of the lower versions and want to upgrade, I would recommend just removing the older package:

sudo apt-get remove mongodb18-10gen

Then install the latest stable release (as of writing that would be 2.2.2):

sudo apt-get install mongodb-10gen
share|improve this answer
I was referring to the shell version by mistake. Will edit to fix it. Thank you. – Alex Waters Nov 28 '12 at 22:22
edited to include a way to upgrade from the lower versions to the latest stable – Adam C Nov 29 '12 at 7:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.