Cleanup removes switched-to version

(Herman verschooten) #1

I ran brew upgrade this morning and it did an automatic cleanup (30 days).
To my big surprise it removed version 5.7 of persona-server, although this version is in use, as I brew switched to it after version 8 came out and I cannot upgrade.
Anyone else seen this?

I restored the 5.7 version from backup, did a brew switch again, and tried a manual brew cleanup, this warns that the 5.7 version is linked and will not be removed, which is as it should be. Now I have to wait 30 days, to see if the auto-cleanup screws it up again.

1 Like
Does brew cask upgrade automatically run brew cask cleanup or should I run cleanup every time after upgrade?
(Sean Molenaar) #2

This sounds like something that should be reported to Homebrew/brew as a bug.

(Konrad Cerny) #3

I run into the same trouble with switching NodeJS versions. I upgraded version to the last 12.1.0 and it removed all tapped versions so I cannot switch back to the last one or any previous I had :frowning:

(Sean Molenaar) #4

That’s the intended behavior.

(Mike McQuaid) #5

While this is a bug I would not rely on brew switch to reliably switch versions but instead use @ versions (perhaps extracted to your own tap with brew extract).