1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-15 14:53:53 -05:00
Files
pyenv/.github/workflows/scripts/brew-uninstall-cascade.sh
2024-12-07 13:58:35 +03:00

11 lines
382 B
Bash
Executable File

#!/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[@]}"