Created lørdag 22 oktober 2016
Cleaning the package cache
# Pacman stores downloaded packages in /var/cache/pacman/pkg
# and it does not remove these versions automatic.
# ARCH change their packages a little, so first install this additional pacman package
$ pacman -S pacman-contrib
# To remove all cached versions of uninstalled packages
$ paccache -ruk0
# To remove remaining, installed, cache packages except for the most recent 2 versions
$ paccache -rk 2
Removing orphans (unused packages)
# To list packages no longer used
$ pacman -Qdt
# To remove orphans
$ pacman -Rns $(pacman -Qtdq)
# If the above returns error: no targets specified no orphans were found.
Old configuration files
# You can manually go through folders and clean up old configuration files from uninstalled packages.
# Some typical destinations may be;
~/.cache/
~/.local/share/
Broken symlinks
# Broken symlinks should be removed.
# To list all broken symlinks
$ find . -type l -! -exec test -e {} \; -print
Review installed packages
# Review a list of your installed packages - there might be some you don't use anymore^
$ pacman -Qet # List installed packages (not dependencies)
Tips and Tricks
# Some random Tips and Tricks
BeachBit
# BleachBit can help you clean the system by removing unwanted files.
# Be careful though. I think this has caused issues for my Firefox,
# so I'd disable cleaning that when running.
$ pacman -S bleachbit