Clean the Arch Linux filesystem

system cleaning cleaning packages Check the size of the package cache: du -sh /var/cache/pacman/pkg/ Removing packages i. Remove uninstalled packages from the cache: sudo pacman -Sc yay -Sc ii. Remove all cached packages except for the most recent three versions of each package: sudo pacman -S pacman-contrib sudo paccache -r iii. Remove all cached packages: sudo pacman -Scc yay -Scc iv. Remove orphaned packages (packages that were installed as dependencies but are no longer required by any installed package): ...