brew cleanup shows incorrect version for MongoDB

Created on 28 Jan 2019  路  3Comments  路  Source: Homebrew/brew

Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [X] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [X] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [X] ran brew update and can still reproduce the problem?
  • [X] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [X] ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

After running brew cleanup, I expected older versions to be cleared, which, for the most part, they were - with the exception of MongoDB, which has been installed and managed with HomeBrew. Likely an issue related to #35996 on brew-core

What happened (include command output)

So in short, brew cleanup doesn't appropriately recognise which version of MongoDB is installed - and which is the latest version.


Command output

Warning: Skipping mongodb: most recent version 4.0.3_1 not installed
but running mongod --verson and brew upgrade mongodb shows a later version installed!
db version v4.0.4
git version: f288a3bdf201007f3693c58e140056adf8b04839
allocator: system
modules: none
build environment:
distarch: x86_64
target_arch: x86_64

What you expected to happen

I'd expect the Homebrew package to recognise that in this instance 4 > 3, so should not skip MongoDB legacy packages in the cleanup process.

Step-by-step reproduction instructions (by running brew commands)

brew upgrade mongodb
brew cleanup

Again - likely linked to #35996 on brew-core.

outdated

Most helpful comment

We're not shipping the latest version of MongoDB as it's not under an open source license. You can fix this with brew uninstall --force mongodb; brew install mongodb.

All 3 comments

We're not shipping the latest version of MongoDB as it's not under an open source license. You can fix this with brew uninstall --force mongodb; brew install mongodb.

We're not shipping the latest version of MongoDB as it's not under an open source license.

Aha! That makes sense. Apologies that didn't occur to me to check. Will keep an eye out for this sort of thing in future before raising issues. Thanks!

@wotarpelo No worries, it's a bit of a confusing (hopefully) one-off.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VagelisD picture VagelisD  路  3Comments

MikeMcQuaid picture MikeMcQuaid  路  3Comments

hktalent picture hktalent  路  4Comments

kirk86 picture kirk86  路  3Comments

paanvaannd picture paanvaannd  路  4Comments