I haven’t run brew on a build machine in a few months.
Today I run
brew upgrade and it did its usual stuff.
Afterwards I started to tweak the configurations of some of the newly updated apps.
It was only then that I noticed that the data of one of my apps is missing.
I scroll back to look at the brew upgrade output and see this:
==> **`brew cleanup` has not been run in 30 days, running now...** Removing: /usr/local/Cellar/artifactory/5.4.1... (8,557 files, 1.2GB) Removing: /usr/local/Cellar/artifactory/5.5.0... (91 files, 78.6MB) Removing: /Users/dev/Library/Logs/Homebrew/jenkins... (2 files, 65.3KB) Pruned 16 symbolic links from /usr/local
brew default behavior for just deleting 1.2GB of my important data without asking me!
I am seriously trying to stay composed here.
This seems obtuse to me.
Cleanup should not by default actually delete any content with zero interaction!
The behavior should either be to prompt the user or to require a command-line flag to automatically respond yes to the prompt.
brew upgrade -f.
Yes, I [now] know about the
export HOMEBREW_NO_INSTALL_CLEANUP=1 option, but it is a little too late now.
Yes, I know my app’s [artifactory] data should be in a version isolated folder; I thought it was and wherever it is was just the default location of the brew installation. ‾_(ツ)_/‾
Thankfully I have an old backup from a few months ago that I can recover most of my data with, but this seems seriously obtuse.
Please turn this zero-interaction behavior off by default.
If someone wants to delete things they can have the power to approve it to automatically do so from the command-line with a switch.