
pacman:ai:84d93
how do I remove orphaned dependencies from pacman and yay
$ pacman -Rns $(pacman -Qdtq) && yay -Rns $(yay -Qdtq)
try on your machine
This command will remove orphaned dependencies from both pacman and yay package managers in Linux. It uses pacman to remove orphaned packages first, and then uses yay (AUR helper) to remove orphaned AUR packages. The -Rns option removes the target package along with its configuration files, and $(pacman -Qdtq) / $(yay -Qdtq) lists all the orphaned packages.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.
Questions that are answered by this command:
- how do I remove orphaned dependencies from pacman and yay?