Created
May 31, 2024 10:30
-
-
Save bionade24/849020ade03e1a8fa8bfe3ef3d5fa504 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "List orphan dependencies: "; | |
for pkg in $(pacman -Qdtq); do | |
pacman -Qi "$pkg" | |
read -p "Remove pkg? (y/n) " remove | |
if [ $remove == "y" ]; then | |
sudo -E pacman -Rsc "$pkg" || sudo -E pacman -Rdd --noconfirm "$pkg"; | |
fi | |
done | |
echo "Finished." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment