HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/local/share/python/pyenv/.github/workflows/scripts/brew-uninstall-cascade.sh
#!/bin/bash

declare -a packages rdepends
packages=("$@")

# have to try one by one, otherwise `brew uses` would only print
# packages that require them all rather than any of them
for package in "${packages[@]}"; do
  rdepends+=($(brew uses --installed --include-build --include-test --include-optional --recursive "$package"))
done
brew uninstall "${packages[@]}" "${rdepends[@]}"