This script removes orphan packages in Arch Linux.
Orphan packages can be seen using pacman -Qdt
command. This script aims to delete all the packages shown by pacman -Qdt
command at once.
script.py -c orphans.txt # Writes a list of orphaned packages to orphans.txt
script.py -r orphans.txt # Removes all packages listed in orphans.txt without removing dependencies
script.py --rd orphans.txt # Removes all packages listed in orphans.txt along with their unneeded dependencies
Call the python script using a bash executable file which can then be placed in $PATH to be used hassle-free.