I'm working with docker and containers and I'd like to install and use only mongodb command line tools (mongodump, mongorestore etc ...)

I unsuccessfully checked the docs.

Is it possible to install the command line tools only?


4 Answers 4


This was totally easy in May 2018 - everything was at the top level of https://brew.sh and self-proclaimed "The Missing Package Manager for macOS (or Linux)"

Install https://brew.sh to get homebrew system running and then

brew tap mongodb/brew
brew install mongodb-community
brew install mongodb-database-tools

Now in late 2020, the tool no longer meets the criteria to be listed as a top-level installation, so you have to first tap a cask for installation.

Also, the tools are now available separate from the database engine separate from compass (which embeds the former). These links work if you don’t want to brew the tools.

  • The whole database and tools is so small and easy to update, just install mongodb and you’ll have all the tools native.
    – bmike
    Mar 18, 2018 at 20:57
  • Hi and thanks bmike, do you know if there's an installable brew package like mongodb-org-tools on ubuntu? Mar 18, 2018 at 21:03
  • No - I’m not familiar with mongodb-org-tools @LucaAnceschi
    – bmike
    Mar 19, 2018 at 0:46

I tried all the proposed solutions but they did not work with me, I downloaded these tools by:

brew install mongodb/brew/mongodb-database-tools
  • @Goldy Thanks for bumping this - I’ve updated my post with the official links.
    – bmike
    Aug 29, 2020 at 14:11
  • You might also want to run brew link mongodb-database-tools to set up all the symlinkes in your bin folder. The install command did not do that automatically for me as I already had an old installation of mongo.
    – odedfos
    Mar 30, 2023 at 6:25

As for today, the correct answer is this:

brew tap mongodb/brew
brew install mongodb-community

It is possible now.

brew tap mongodb/brew
brew install mongodb-community-shell

Link: https://github.com/mongodb/homebrew-brew

  • incorrect, mongodb-community-shell comes without the tools he needs
    – user208958
    Feb 20, 2020 at 8:01
  • 2
    This does not install mongorestore, mongodump, etc. Jun 6, 2020 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .