Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing a cask triggers autoremove and removes lots of unrelated formulas #17572

Closed
3 tasks done
metayan opened this issue Jun 27, 2024 · 11 comments · Fixed by #17589
Closed
3 tasks done

Removing a cask triggers autoremove and removes lots of unrelated formulas #17572

metayan opened this issue Jun 27, 2024 · 11 comments · Fixed by #17589
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this

Comments

@metayan
Copy link

metayan commented Jun 27, 2024

brew doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  beaker-browser
  controllermate
  lighttable
  meld
  mplayer-osx-extended
  phantomjs
  qtox
  quik

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  libxtgl
  subliminal
  c2ffi
  python@2
  faceshift
  libghttp
  ext4fuse
  picolisp
  bearlibterminal
  openvr
  fb-adb
  jskeus
  extempore
  pdflib-lite
  libsoil
  libgnomecanvasmm
  kissfft
  sxiv
  googler
  autopano-sift-c
  gtest
  liblwgeom
  gpg-agent
  gv
  py2cairo
  bazaar
  libgnomecanvas
  xtermcontrol
  python-flit-core
  libstb-image
  swig@3
  gr-osmosdr
  canu
  sdl_rtf
  tinyscheme
  python-markupsafe
  rtmidi-c

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  afl-fuzz
  audiofile
  [email protected]
  cowsay
  exa
  googler
  gqview
  ilmbase
  [email protected]
  [email protected]
  libglade
  libhid
  liblwgeom
  [email protected]
  mit-scheme
  nlohmann_json
  [email protected]
  ploticus
  proj@7
  sdl_image
  sdl_mixer
  sdl_net
  sdl_sound
  sdl_ttf
  subliminal
  ufraw
  upx

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-cask-versions
  Homebrew/homebrew-cask-drivers
Untap them with `brew untap`.

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libMoltenVK.dylib
  /usr/local/lib/libSPIRV-Tools-shared.dylib
  /usr/local/lib/libVkLayer_api_dump.dylib
  /usr/local/lib/libVkLayer_device_simulation.dylib
  /usr/local/lib/libVkLayer_khronos_synchronization2.dylib
  /usr/local/lib/libVkLayer_khronos_validation.dylib
  /usr/local/lib/libavcodec.59.37.100.dylib
  /usr/local/lib/libavcodec.60.3.100.dylib
  /usr/local/lib/libavformat.59.27.100.dylib
  /usr/local/lib/libavformat.60.3.100.dylib
  /usr/local/lib/libavutil.57.28.100.dylib
  /usr/local/lib/libavutil.58.2.100.dylib
  /usr/local/lib/libdxcompiler.3.7.dylib
  /usr/local/lib/libgtkdatabox.1.dylib
  /usr/local/lib/libhackrf.0.5.0.dylib
  /usr/local/lib/libhackrf.0.6.0.dylib
  /usr/local/lib/libhackrf.0.7.0.dylib
  /usr/local/lib/libhackrf.0.8.0.dylib
  /usr/local/lib/libqvr.4.0.0.dylib
  /usr/local/lib/libspirv-cross-c-shared.0.47.0.dylib
  /usr/local/lib/libswresample.4.10.100.dylib
  /usr/local/lib/libswresample.4.7.100.dylib
  /usr/local/lib/libtbb.12.8.dylib
  /usr/local/lib/libtbb.12.dylib
  /usr/local/lib/libtbb.dylib
  /usr/local/lib/libtbbmalloc.2.8.dylib
  /usr/local/lib/libtbbmalloc.2.dylib
  /usr/local/lib/libtbbmalloc.dylib
  /usr/local/lib/libtbbmalloc_proxy.2.8.dylib
  /usr/local/lib/libtbbmalloc_proxy.2.dylib
  /usr/local/lib/libtbbmalloc_proxy.dylib
  /usr/local/lib/libusb-1.0.0.dylib
  /usr/local/lib/libvulkan.1.2.176.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected header files:
  /usr/local/include/dxc/Support/WinAdapter.h
  /usr/local/include/dxc/dxcapi.h
  /usr/local/include/gtkdatabox.h
  /usr/local/include/gtkdatabox_bars.h
  /usr/local/include/gtkdatabox_cross_simple.h
  /usr/local/include/gtkdatabox_graph.h
  /usr/local/include/gtkdatabox_grid.h
  /usr/local/include/gtkdatabox_lines.h
  /usr/local/include/gtkdatabox_markers.h
  /usr/local/include/gtkdatabox_marshal.h
  /usr/local/include/gtkdatabox_offset_bars.h
  /usr/local/include/gtkdatabox_points.h
  /usr/local/include/gtkdatabox_regions.h
  /usr/local/include/gtkdatabox_ruler.h
  /usr/local/include/gtkdatabox_scale.h
  /usr/local/include/gtkdatabox_typedefs.h
  /usr/local/include/gtkdatabox_xyc_graph.h
  /usr/local/include/gtkdatabox_xyyc_graph.h
  /usr/local/include/libavcodec/ac3_parser.h
  /usr/local/include/libavcodec/adts_parser.h
  /usr/local/include/libavcodec/avcodec.h
  /usr/local/include/libavcodec/avdct.h
  /usr/local/include/libavcodec/avfft.h
  /usr/local/include/libavcodec/bsf.h
  /usr/local/include/libavcodec/codec.h
  /usr/local/include/libavcodec/codec_desc.h
  /usr/local/include/libavcodec/codec_id.h
  /usr/local/include/libavcodec/codec_par.h
  /usr/local/include/libavcodec/d3d11va.h
  /usr/local/include/libavcodec/defs.h
  /usr/local/include/libavcodec/dirac.h
  /usr/local/include/libavcodec/dv_profile.h
  /usr/local/include/libavcodec/dxva2.h
  /usr/local/include/libavcodec/jni.h
  /usr/local/include/libavcodec/mediacodec.h
  /usr/local/include/libavcodec/packet.h
  /usr/local/include/libavcodec/qsv.h
  /usr/local/include/libavcodec/vdpau.h
  /usr/local/include/libavcodec/version.h
  /usr/local/include/libavcodec/version_major.h
  /usr/local/include/libavcodec/videotoolbox.h
  /usr/local/include/libavcodec/vorbis_parser.h
  /usr/local/include/libavcodec/xvmc.h
  /usr/local/include/libavdevice/avdevice.h
  /usr/local/include/libavdevice/version.h
  /usr/local/include/libavdevice/version_major.h
  /usr/local/include/libavfilter/avfilter.h
  /usr/local/include/libavfilter/buffersink.h
  /usr/local/include/libavfilter/buffersrc.h
  /usr/local/include/libavfilter/version.h
  /usr/local/include/libavfilter/version_major.h
  /usr/local/include/libavformat/avformat.h
  /usr/local/include/libavformat/avio.h
  /usr/local/include/libavformat/version.h
  /usr/local/include/libavformat/version_major.h
  /usr/local/include/libavutil/adler32.h
  /usr/local/include/libavutil/aes.h
  /usr/local/include/libavutil/aes_ctr.h
  /usr/local/include/libavutil/ambient_viewing_environment.h
  /usr/local/include/libavutil/attributes.h
  /usr/local/include/libavutil/audio_fifo.h
  /usr/local/include/libavutil/avassert.h
  /usr/local/include/libavutil/avconfig.h
  /usr/local/include/libavutil/avstring.h
  /usr/local/include/libavutil/avutil.h
  /usr/local/include/libavutil/base64.h
  /usr/local/include/libavutil/blowfish.h
  /usr/local/include/libavutil/bprint.h
  /usr/local/include/libavutil/bswap.h
  /usr/local/include/libavutil/buffer.h
  /usr/local/include/libavutil/camellia.h
  /usr/local/include/libavutil/cast5.h
  /usr/local/include/libavutil/channel_layout.h
  /usr/local/include/libavutil/common.h
  /usr/local/include/libavutil/cpu.h
  /usr/local/include/libavutil/crc.h
  /usr/local/include/libavutil/csp.h
  /usr/local/include/libavutil/des.h
  /usr/local/include/libavutil/detection_bbox.h
  /usr/local/include/libavutil/dict.h
  /usr/local/include/libavutil/display.h
  /usr/local/include/libavutil/dovi_meta.h
  /usr/local/include/libavutil/downmix_info.h
  /usr/local/include/libavutil/encryption_info.h
  /usr/local/include/libavutil/error.h
  /usr/local/include/libavutil/eval.h
  /usr/local/include/libavutil/ffversion.h
  /usr/local/include/libavutil/fifo.h
  /usr/local/include/libavutil/file.h
  /usr/local/include/libavutil/film_grain_params.h
  /usr/local/include/libavutil/frame.h
  /usr/local/include/libavutil/hash.h
  /usr/local/include/libavutil/hdr_dynamic_metadata.h
  /usr/local/include/libavutil/hdr_dynamic_vivid_metadata.h
  /usr/local/include/libavutil/hmac.h
  /usr/local/include/libavutil/hwcontext.h
  /usr/local/include/libavutil/hwcontext_cuda.h
  /usr/local/include/libavutil/hwcontext_d3d11va.h
  /usr/local/include/libavutil/hwcontext_drm.h
  /usr/local/include/libavutil/hwcontext_dxva2.h
  /usr/local/include/libavutil/hwcontext_mediacodec.h
  /usr/local/include/libavutil/hwcontext_opencl.h
  /usr/local/include/libavutil/hwcontext_qsv.h
  /usr/local/include/libavutil/hwcontext_vaapi.h
  /usr/local/include/libavutil/hwcontext_vdpau.h
  /usr/local/include/libavutil/hwcontext_videotoolbox.h
  /usr/local/include/libavutil/hwcontext_vulkan.h
  /usr/local/include/libavutil/imgutils.h
  /usr/local/include/libavutil/intfloat.h
  /usr/local/include/libavutil/intreadwrite.h
  /usr/local/include/libavutil/lfg.h
  /usr/local/include/libavutil/log.h
  /usr/local/include/libavutil/lzo.h
  /usr/local/include/libavutil/macros.h
  /usr/local/include/libavutil/mastering_display_metadata.h
  /usr/local/include/libavutil/mathematics.h
  /usr/local/include/libavutil/md5.h
  /usr/local/include/libavutil/mem.h
  /usr/local/include/libavutil/motion_vector.h
  /usr/local/include/libavutil/murmur3.h
  /usr/local/include/libavutil/opt.h
  /usr/local/include/libavutil/parseutils.h
  /usr/local/include/libavutil/pixdesc.h
  /usr/local/include/libavutil/pixelutils.h
  /usr/local/include/libavutil/pixfmt.h
  /usr/local/include/libavutil/random_seed.h
  /usr/local/include/libavutil/rational.h
  /usr/local/include/libavutil/rc4.h
  /usr/local/include/libavutil/replaygain.h
  /usr/local/include/libavutil/ripemd.h
  /usr/local/include/libavutil/samplefmt.h
  /usr/local/include/libavutil/sha.h
  /usr/local/include/libavutil/sha512.h
  /usr/local/include/libavutil/spherical.h
  /usr/local/include/libavutil/stereo3d.h
  /usr/local/include/libavutil/tea.h
  /usr/local/include/libavutil/threadmessage.h
  /usr/local/include/libavutil/time.h
  /usr/local/include/libavutil/timecode.h
  /usr/local/include/libavutil/timestamp.h
  /usr/local/include/libavutil/tree.h
  /usr/local/include/libavutil/twofish.h
  /usr/local/include/libavutil/tx.h
  /usr/local/include/libavutil/uuid.h
  /usr/local/include/libavutil/version.h
  /usr/local/include/libavutil/video_enc_params.h
  /usr/local/include/libavutil/xtea.h
  /usr/local/include/libhackrf/hackrf.h
  /usr/local/include/libswresample/swresample.h
  /usr/local/include/libswresample/version.h
  /usr/local/include/libswresample/version_major.h
  /usr/local/include/libswscale/swscale.h
  /usr/local/include/libswscale/version.h
  /usr/local/include/libswscale/version_major.h
  /usr/local/include/libusb-1.0/libusb.h
  /usr/local/include/spirv-tools/libspirv.h
  /usr/local/include/spirv_cross/GLSL.std.450.h
  /usr/local/include/spirv_cross/spirv.h
  /usr/local/include/spirv_cross/spirv_cross_c.h

Warning: Unbrewed '.la' files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected '.la' files:
  /usr/local/lib/libgtkdatabox.la
  /usr/local/lib/libusb-1.0.la

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/gtkdatabox.pc
  /usr/local/lib/pkgconfig/libavcodec.pc
  /usr/local/lib/pkgconfig/libavdevice.pc
  /usr/local/lib/pkgconfig/libavfilter.pc
  /usr/local/lib/pkgconfig/libavformat.pc
  /usr/local/lib/pkgconfig/libavutil.pc
  /usr/local/lib/pkgconfig/libhackrf.pc
  /usr/local/lib/pkgconfig/libswresample.pc
  /usr/local/lib/pkgconfig/libswscale.pc
  /usr/local/lib/pkgconfig/libusb-1.0.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libSPIRV-Tools-link.a
  /usr/local/lib/libSPIRV-Tools-opt.a
  /usr/local/lib/libSPIRV-Tools-reduce.a
  /usr/local/lib/libSPIRV-Tools.a
  /usr/local/lib/libavcodec.a
  /usr/local/lib/libavdevice.a
  /usr/local/lib/libavfilter.a
  /usr/local/lib/libavformat.a
  /usr/local/lib/libavutil.a
  /usr/local/lib/libgtkdatabox.a
  /usr/local/lib/libhackrf.a
  /usr/local/lib/libshaderc_util.a
  /usr/local/lib/libspirv-cross-c.a
  /usr/local/lib/libspirv-cross-core.a
  /usr/local/lib/libspirv-cross-cpp.a
  /usr/local/lib/libspirv-cross-glsl.a
  /usr/local/lib/libspirv-cross-hlsl.a
  /usr/local/lib/libspirv-cross-msl.a
  /usr/local/lib/libspirv-cross-reflect.a
  /usr/local/lib/libspirv-cross-util.a
  /usr/local/lib/libswresample.a
  /usr/local/lib/libswscale.a
  /usr/local/lib/libusb-1.0.a

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  mit-scheme
  python-packaging
  python@2
  ghostscript
  pygments
  heroku
  pyqt@5
  docutils
  clang-format
  sdl2_ttf
  hackrf
  moreutils
  pillow
  mercurial
  tcl-tk
  pyyaml
  vulkan-loader
  mkdocs
  gstreamer
  nanomsg
  libusb
  glances
  python-markupsafe

Warning: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.


Warning: You have uncommitted modifications to Homebrew/brew.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /usr/local/Homebrew && git stash -u && git clean -d -f

Uncommitted files:
  ?? Library/Homebrew/TAGS

You have uncommitted modifications to Homebrew/homebrew-core.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash -u && git clean -d -f

Uncommitted files:
   M Formula/c/cairo.rb
   M Formula/c/clojure.rb
   M Formula/f/[email protected]
   M Formula/g/git.rb
   M Formula/h/handbrake.rb
   M Formula/lib/libplacebo.rb
   M Formula/m/mpv.rb
   M Formula/n/ncspot.rb
   M Formula/p/planck.rb
   M Formula/r/rubberband.rb
   M Formula/s/sbcl.rb
   M Formula/v/vim.rb
  ?? Formula/[email protected]
  ?? Formula/[email protected]

You have uncommitted modifications to Homebrew/homebrew-cask.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask && git stash -u && git clean -d -f

Uncommitted files:
   M Casks/s/spotify.rb
  ?? Casks/avogadro2.rb
  ?? Casks/fluxus.rb
  ?? Casks/merkaartor.rb
  ?? Casks/portacle.rb
  ?? Casks/vulkan-sdk.rb

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
  git -C $(brew --repo pothosware/pothos) checkout master

Warning: Broken symlinks were found. Remove them with `brew cleanup`:
  /usr/local/bin/darktable-cli
  /usr/local/lib/ruby/gems/3.0.0/bin/bundle
  /usr/local/lib/ruby/gems/3.0.0/bin/bundler
  /usr/local/opt/[email protected]
  /usr/local/opt/[email protected]

Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install ffmpeg graphene libfuse@2 pmix [email protected] sbcl tinyxml

Run `brew missing` for more details.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.3.7-17-gd293ac1
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: d293ac1fe14a1e43c015a42894c85118ef9290d4
Last commit: 13 hours ago
Core tap HEAD: cb72cd2a5103b4794b5f2d43ffdcbcb9d4a36a48
Core tap last commit: 8 hours ago
Core tap JSON: 21 Oct 03:36 UTC
Core cask tap HEAD: a92754b360ffa66f47bcf51fa51a2cdcb2bac3c3
Core cask tap last commit: 10 hours ago
Core cask tap JSON: 21 Oct 03:36 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_AUTO_UPDATE_SECS: 2592000
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.SjSaJmRagR/org.xquartz:0
HOMEBREW_EDITOR: et
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_INSTALL_CLEANUP: set
HOMEBREW_NO_INSTALL_FROM_API: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: octa-core 64-bit haswell
Clang: 12.0.0 build 1200
Git: 2.45.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.7-x86_64
CLT: 12.4.0.0.1.1610135815
Xcode: N/A

What were you trying to do (and why)?

brew remove darktable

because I first did
brew upgrade --cask darktable
but it seemed to get upgraded to a version that needs Ventura:
Error: darktable: This software does not run on macOS versions older than Ventura.

What happened (include all command output)?

==> Uninstalling Cask darktable
==> Backing App 'darktable.app' up to '/usr/local/Caskroom/darktable/4.6.1/darktable.app'
==> Removing App '/Applications/darktable.app'
==> Purging files for version 4.6.1 of Cask darktable
==> Autoremoving 89 unneeded formulae:
antiword
arpack
atkmm
autoconf-archive
binaryen
boost-python
cd-discid
check
clutter
clutter-gtk
cmuclmtk
cogl
cppunit
dep
dnstracer
doctest
elinks
epsilon
exempi
ext2fuse
fluid-synth
fortune
freexl
ftgl
geoip
gifsicle
glpk
gnome-doc-utils
graphene
gstreamer
httpd
id3lib
id3v2
libbs2b
libccd
libcroco
libcue
libdap
libdvdcss
libdvdnav
libdvdread
libebml
libgeotiff
libmatroska
libmetalink
libquvi
librttopo
libsmi
libspatialite
libstfl
libvo-aacenc
[email protected]
luajit-openresty
lynx
mcrypt
mhash
miniupnpc
minizip
mplayershell
newlisp
ngrep
nlopt
ntfs-3g
[email protected]
ode
openexr@2
openjdk@11
pangomm
po4a
podofo
proctools
proj
qrencode
quvi
[email protected]
sane-backends
scapy
schroedinger
smpeg2
sqlcipher
stk
szip
tbb@2020
texi2html
uchardet
unrar
wiiuse
wv
xerces-c
Uninstalling /usr/local/Cellar/ext2fuse/0.8.1_2... (8 files, 102.8KB)
Uninstalling /usr/local/Cellar/ngrep/1.47... (7 files, 91.5KB)
Uninstalling /usr/local/Cellar/exempi/2.6.2... (18 files, 4.5MB)
Uninstalling /usr/local/Cellar/binaryen/111... (1,633 files, 46.7MB)
Uninstalling /usr/local/Cellar/lynx/2.8.9rel.1_1... (11 files, 2.2MB)
Uninstalling /usr/local/Cellar/sane-backends/1.1.1_1... (464 files, 19MB)
Uninstalling /usr/local/Cellar/arpack/3.8.0_2... (40 files, 1.1MB)
Uninstalling /usr/local/Cellar/miniupnpc/2.2.4... (22 files, 272KB)
Uninstalling /usr/local/Cellar/quvi/0.4.2... (8 files, 95.5KB)
Uninstalling /usr/local/Cellar/libgeotiff/1.7.1_2... (39 files, 719.6KB)
Uninstalling /usr/local/Cellar/mplayershell/0.9.3... (5 files, 131.3KB)
Uninstalling /usr/local/Cellar/ftgl/2.1.3-rc5... (35 files, 734.6KB)
Uninstalling /usr/local/Cellar/gnome-doc-utils/0.20.10_1... (262 files, 3.4MB)
Uninstalling /usr/local/Cellar/nlopt/2.7.1... (24 files, 588KB)
Uninstalling /usr/local/Cellar/texi2html/5.0... (278 files, 6.2MB)
Uninstalling /usr/local/Cellar/libvo-aacenc/0.1.3... (16 files, 300.3KB)
Uninstalling /usr/local/Cellar/autoconf-archive/2022.09.03... (599 files, 3.6MB)
Uninstalling /usr/local/Cellar/openjdk@11/11.0.16.1_1... (678 files, 299.8MB)
Uninstalling /usr/local/Cellar/po4a/0.68_1... (677 files, 5.6MB)
Uninstalling /usr/local/Cellar/id3v2/0.1.12... (6 files, 92KB)
Uninstalling /usr/local/Cellar/dnstracer/1.9... (6 files, 42KB)
Uninstalling /usr/local/Cellar/doctest/2.4.9... (11 files, 413.7KB)
Uninstalling /usr/local/Cellar/epsilon/0.9.2... (17 files, 305.8KB)
Uninstalling /usr/local/Cellar/proctools/0.4pre1... (9 files, 113.1KB)
Uninstalling /usr/local/Cellar/scapy/2.3.3... (150 files, 2.4MB)
Uninstalling /usr/local/Cellar/fluid-synth/2.3.0... (42 files, 2.3MB)
Uninstalling /usr/local/Cellar/wv/1.2.9_1... (488 files, 1.2MB)
Uninstalling /usr/local/Cellar/geoip/1.6.12... (18 files, 548.6KB)

Warning: The following may be geoip configuration files and have not been removed!
If desired, remove them manually with rm -rf:
/usr/local/etc/GeoIP.conf
/usr/local/etc/GeoIP.conf.default
Uninstalling /usr/local/Cellar/libspatialite/5.0.1_2... (40 files, 24.5MB)
Uninstalling /usr/local/Cellar/cppunit/1.15.1... (90 files, 1.3MB)
Uninstalling /usr/local/Cellar/openexr@2/2.5.8... (152 files, 6.9MB)
Uninstalling /usr/local/Cellar/libdvdnav/6.1.1... (20 files, 320.8KB)
Uninstalling /usr/local/Cellar/xerces-c/3.2.4... (1,686 files, 38.3MB)
Uninstalling /usr/local/Cellar/libsmi/0.5.0... (476 files, 20.1MB)
Uninstalling /usr/local/Cellar/stk/4.6.2... (1,184 files, 18.6MB)
Uninstalling /usr/local/Cellar/wiiuse/0.15.5... (10 files, 210.8KB)
Uninstalling /usr/local/Cellar/libcue/2.2.1... (20 files, 119.7KB)
Uninstalling /usr/local/Cellar/libstfl/0.24_13... (19 files, 619.2KB)
Uninstalling /usr/local/Cellar/pangomm/2.50.1... (70 files, 693KB)
Uninstalling /usr/local/Cellar/libdap/3.20.11... (163 files, 6.8MB)
Uninstalling /usr/local/Cellar/clutter-gtk/1.8.4_4... (45 files, 304.6KB)
Uninstalling /usr/local/Cellar/boost-python/1.74.0... (460 files, 5.5MB)
Error: ntfs-3g is pinned. You must unpin it to uninstall.
Uninstalling /usr/local/Cellar/glpk/5.0... (179 files, 3.4MB)
Uninstalling /usr/local/Cellar/libmatroska/1.7.1... (43 files, 775.8KB)
Uninstalling /usr/local/Cellar/atkmm/2.36.2... (57 files, 692.1KB)
Uninstalling /usr/local/Cellar/libcroco/0.6.13_1... (80 files, 1.7MB)
Uninstalling /usr/local/Cellar/ode/0.16.2... (38 files, 1.5MB)
Uninstalling /usr/local/Cellar/schroedinger/1.0.11... (83 files, 2.2MB)
Uninstalling /usr/local/Cellar/httpd/2.4.54_1... (1,662 files, 31.8MB)

Warning: The following httpd configuration files have not been removed!
If desired, remove them manually with rm -rf:
/usr/local/etc/httpd
/usr/local/etc/httpd/extra
/usr/local/etc/httpd/extra/httpd-autoindex.conf
/usr/local/etc/httpd/extra/httpd-dav.conf
/usr/local/etc/httpd/extra/httpd-default.conf
/usr/local/etc/httpd/extra/httpd-info.conf
/usr/local/etc/httpd/extra/httpd-languages.conf
/usr/local/etc/httpd/extra/httpd-manual.conf
/usr/local/etc/httpd/extra/httpd-manual.conf.default
/usr/local/etc/httpd/extra/httpd-mpm.conf
/usr/local/etc/httpd/extra/httpd-multilang-errordoc.conf
/usr/local/etc/httpd/extra/httpd-ssl.conf
/usr/local/etc/httpd/extra/httpd-userdir.conf
/usr/local/etc/httpd/extra/httpd-vhosts.conf
/usr/local/etc/httpd/extra/proxy-html.conf
/usr/local/etc/httpd/httpd.conf
/usr/local/etc/httpd/httpd.conf.default
/usr/local/etc/httpd/magic
/usr/local/etc/httpd/magic.default
/usr/local/etc/httpd/mime.types
/usr/local/etc/httpd/original
/usr/local/etc/httpd/original/extra
/usr/local/etc/httpd/original/extra/httpd-autoindex.conf
/usr/local/etc/httpd/original/extra/httpd-dav.conf
/usr/local/etc/httpd/original/extra/httpd-default.conf
/usr/local/etc/httpd/original/extra/httpd-info.conf
/usr/local/etc/httpd/original/extra/httpd-languages.conf
/usr/local/etc/httpd/original/extra/httpd-manual.conf
/usr/local/etc/httpd/original/extra/httpd-manual.conf.default
/usr/local/etc/httpd/original/extra/httpd-mpm.conf
/usr/local/etc/httpd/original/extra/httpd-multilang-errordoc.conf
/usr/local/etc/httpd/original/extra/httpd-ssl.conf
/usr/local/etc/httpd/original/extra/httpd-userdir.conf
/usr/local/etc/httpd/original/extra/httpd-vhosts.conf
/usr/local/etc/httpd/original/extra/proxy-html.conf
/usr/local/etc/httpd/original/httpd.conf
/usr/local/etc/httpd/original/httpd.conf.default

Warning: The following may be httpd configuration files and have not been removed!
If desired, remove them manually with rm -rf:
/usr/local/etc/lighttpd
Uninstalling /usr/local/Cellar/sqlcipher/4.5.2... (13 files, 4.3MB)
Uninstalling /usr/local/Cellar/gifsicle/1.93... (9 files, 382.4KB)
Uninstalling /usr/local/Cellar/graphene/1.10.8... (36 files, 1MB)
Uninstalling /usr/local/Cellar/luajit-openresty/2.1-20220915... (38 files, 1.8MB)
Uninstalling /usr/local/Cellar/dep/0.5.4... (7 files, 11.6MB)
Uninstalling /usr/local/Cellar/unrar/6.0.1... (6 files, 524.9KB)
Uninstalling /usr/local/Cellar/mcrypt/2.6.8... (18 files, 396.4KB)
Uninstalling /usr/local/Cellar/cmuclmtk/0.7... (44 files, 564.7KB)
Uninstalling /usr/local/Cellar/qrencode/4.1.1... (13 files, 207.6KB)
Uninstalling /usr/local/Cellar/gstreamer/1.20.4... (220 files, 15.2MB)
gstreamer 1.20.3 is still installed.
To remove all versions, run:
brew uninstall --force gstreamer
Uninstalling /usr/local/Cellar/antiword/0.37... (39 files, 553.9KB)
Uninstalling /usr/local/Cellar/cd-discid/1.4_2... (6 files, 37.3KB)
Uninstalling /usr/local/Cellar/newlisp/10.7.5... (37 files, 1.7MB)
Uninstalling /usr/local/Cellar/libbs2b/3.1.0... (15 files, 75.6KB)
Uninstalling /usr/local/Cellar/libmetalink/0.1.3... (31 files, 178.8KB)
Uninstalling /usr/local/Cellar/uchardet/0.0.7... (13 files, 543.3KB)
Uninstalling /usr/local/Cellar/check/0.15.2... (42 files, 533.0KB)
Uninstalling /usr/local/Cellar/szip/2.1.1_1... (11 files, 108.6KB)
Uninstalling /usr/local/Cellar/smpeg2/2.0.0... (23 files, 618.4KB)
Uninstalling /usr/local/Cellar/[email protected]/3.0.4_1... (16,329 files, 39.2MB)
Uninstalling /usr/local/Cellar/tbb@2020/2020_U3... (144 files, 3MB)
Uninstalling /usr/local/Cellar/podofo/0.9.8_1... (154 files, 5MB)
Uninstalling /usr/local/Cellar/fortune/9708... (117 files, 3.4MB)
Uninstalling /usr/local/Cellar/[email protected]/1.16.6_1... (503 files, 10.7MB)
Uninstalling /usr/local/Cellar/elinks/0.11.7_3... (43 files, 2.5MB)
Uninstalling /usr/local/Cellar/proj/9.1.0... (438 files, 596.2MB)
Uninstalling /usr/local/Cellar/libebml/1.4.4... (42 files, 316.4KB)
Uninstalling /usr/local/Cellar/libccd/2.1_1... (18 files, 108.7KB)
Uninstalling /usr/local/Cellar/mhash/0.9.9.9... (19 files, 453.0KB)
Uninstalling /usr/local/Cellar/libdvdread/6.1.3... (28 files, 588.1KB)
Uninstalling /usr/local/Cellar/minizip/1.2.13... (14 files, 394.7KB)
Uninstalling /usr/local/Cellar/librttopo/1.1.0... (12 files, 1MB)
Uninstalling /usr/local/Cellar/id3lib/3.8.3_1... (29 files, 1.2MB)
Uninstalling /usr/local/Cellar/freexl/1.0.6... (115 files, 899.2KB)
Uninstalling /usr/local/Cellar/libquvi/0.4.1_2... (85 files, 356.6KB)
Uninstalling /usr/local/Cellar/clutter/1.26.4... (390 files, 16.8MB)
Uninstalling /usr/local/Cellar/[email protected]/5.1.5_8... (22 files, 245.5KB)

Warning: The following may be [email protected] configuration files and have not been removed!
If desired, remove them manually with rm -rf:
/usr/local/etc/luarocks51
/usr/local/etc/luarocks52
/usr/local/etc/luarocks53
Uninstalling /usr/local/Cellar/cogl/1.22.8... (179 files, 4.2MB)
Uninstalling /usr/local/Cellar/libdvdcss/1.4.3... (18 files, 398.5KB)

What did you expect to happen?

Expected only darktable to be removed, not a whole lot of unrelated formulas to be removed.

Running on Catalina, so installing applications is already non-trivial, and having them uninstalled without asking for it is not nice, to put it mildly.

I'm aware of the fact that Catalina is unsupported, but this issue is most likely not related to only Catalina, but revealing a flaw in the general Homebrew removal logic, which is why I'm "sneaking" it through the reporting process.

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

Have an old version of `darktable` installed.
Try to upgrade it and have the upgrade fail.
Then
`brew remove darktable`
@metayan metayan added the bug Reproducible Homebrew/brew bug label Jun 27, 2024
@MikeMcQuaid
Copy link
Member

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

@metayan If you follow these instructions yourself: does it both install all these formulae and remove them? If you install them manually: are they removed every time?

@metayan
Copy link
Author

metayan commented Jun 27, 2024

Installed darktable 4.6.1 again, by tweaking the formula.
Then removed darktable.
This time the removal also tried to autoremove other things:

brew install --cask darktable
==> Downloading https://github.com/darktable-org/darktable/releases/download/release-4.6.1/darktable-4.6.1-x86_64.dmg
==> Installing Cask darktable
==> Moving App 'darktable.app' to '/Applications/darktable.app'
🍺  darktable was successfully installed!
brew remove darktable
==> Uninstalling Cask darktable
==> Backing App 'darktable.app' up to '/usr/local/Caskroom/darktable/4.6.1/darktable.app'
==> Removing App '/Applications/darktable.app'
==> Purging files for version 4.6.1 of Cask darktable
==> Autoremoving 1 unneeded formula:
ntfs-3g
Error: ntfs-3g is pinned. You must unpin it to uninstall.
brew info ntfs-3g
==> ntfs-3g: stable 2022.10.3, HEAD [pinned at 2017.3.23_3]
Read-write NTFS driver for FUSE
https://www.tuxera.com/community/open-source-ntfs-3g/
Installed
/usr/local/Cellar/ntfs-3g/2017.3.23_3 (89 files, 1.7MB) *
  Poured from bottle on 2020-06-20 at 01:53:27

Feel free to ask for more info if needed.

@metayan
Copy link
Author

metayan commented Jun 27, 2024

I just feel that removing a cask – that has no Homebrew dependencies – shouldn't remove any installed apps that have nothing to do with the cask in question.

@MikeMcQuaid
Copy link
Member

What does brew autoremove --dry-run output?

@metayan
Copy link
Author

metayan commented Jun 27, 2024

brew autoremove --dry-run
==> Would autoremove 1 unneeded formula:
ntfs-3g

But it already removed all the autoremovable formulas before, when doing

brew remove darktable

as I reported above.
And ntfs-3g is pinned.

@MikeMcQuaid
Copy link
Member

@metayan Can you paste the output of cat $(brew --prefix ntfs-3g)/INSTALL_RECEIPT.json? Thanks.

@metayan
Copy link
Author

metayan commented Jun 28, 2024

cat $(brew --prefix ntfs-3g)/INSTALL_RECEIPT.json |jq '.'
{
  "homebrew_version": "2.4.0-53-g748af98",
  "used_options": [],
  "unused_options": [],
  "built_as_bottle": true,
  "poured_from_bottle": true,
  "installed_as_dependency": null,
  "installed_on_request": null,
  "changed_files": [
    "sbin/mount_ntfs",
    "INSTALL_RECEIPT.json",
    "lib/pkgconfig/libntfs-3g.pc"
  ],
  "time": 1592610807,
  "source_modified_time": 1490262180,
  "HEAD": null,
  "stdlib": null,
  "compiler": "clang",
  "aliases": [],
  "runtime_dependencies": [
    {
      "full_name": "gettext",
      "version": "0.20.2"
    }
  ],
  "source": {
    "path": "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ntfs-3g.rb",
    "tap": "homebrew/core",
    "spec": "stable",
    "versions": {
      "stable": "2017.3.23",
      "devel": "",
      "head": "HEAD",
      "version_scheme": 0
    }
  }
}

@Rylan12
Copy link
Member

Rylan12 commented Jun 29, 2024

  "installed_as_dependency": null,
  "installed_on_request": null,

These lines are causing autoremove to try and remove the formula. You can stop this from happening by running:

brew tab --installed-on-request ntfs-3g

I'm not totally sure why the values where written as null, but perhaps it has something to do with brew pin handling? Either way, we should handle this case by erring on the side of caution and not removing the formula. I've opened a PR to implement this.

@Rylan12 Rylan12 added the in progress Maintainers are working on this label Jun 29, 2024
@metayan
Copy link
Author

metayan commented Jun 29, 2024

The pinned formula was not removed, so no worries about that.

The issue is that 89 formulas were autoremoved when a cask was removed. Formulas that had nothing to do with the cask.
As can be seen above after

==> Autoremoving 89 unneeded formulae:

At least a request for confirmation that 89 formulas will be removed would be appropriate.

@Rylan12
Copy link
Member

Rylan12 commented Jun 29, 2024

The PR merged should indeed fix this problem.

In this case, the problem seems to be that somehow the install metadata on your system was messed up, and did not properly mark that those formulae were installed at your request (as opposed to as a dependency for something else). I'm not sure at the moment why that happened, but the PR I merged strengthens the check so that Homebrew treats messed up metadata as "not sure, but let's assume they are installed on request and keep them around just in case." In the future, autoremove will only remove formulae that have "installed_on_request": false (as opposed to null) to avoid this from happening again.

@metayan
Copy link
Author

metayan commented Jun 29, 2024

Great. Thanks for the explanation. And the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants