Removing Software Cleanly
Uninstalling is where distros differ. Do it right and your disk stays lean for years.
Remove a package completely
sudo pacman -Rns <package>
Flag anatomy: -R remove · -n delete saved config files · -s strip now-unused dependencies.
Find what’s worth removing
pacman -Qdt # orphans (installed as deps, nothing needs them)
pacman -Qe # explicitly installed by you
pacman -Qeq | sort # same, alphabetical
du -sh /var/cache/pacman/pkg # how much cache you're hoarding
Then act:
sudo pacman -Rns $(pacman -Qdtq) # purge all orphans at once
Removing an AUR package
Same command — yay builds real pacman packages:
yay -Rns <package>
yay -Yc # also drop unneeded AUR deps
Flatpak cleanup
flatpak uninstall <app>
flatpak uninstall --unused # drop runtimes nothing uses anymore
Full reset checklist
Before wiping an entire app ecosystem (e.g., "all Python stuff"), list first, then delete:
pacman -Qs python
pacman -Qg gnome # group members
And remember the safety net: big removal sprees are exactly when a fresh Timeshift snapshot pays for itself.