🐧 Remove pacman cache

2016/11/10 by Paulo Pereira

~/categories/Linux #Linux #Arch Linux #pacman

pacman keeps a cache of package versions it installs in /var/cache/pacman/pkg/.

As you install and upgrade more packages, the more it grows.

So, it’s a good ideia to clean it from time to time.

If you want to keep the last 2 versions of each package as an example, just execute the following.

sudo paccache -rk 2

==> finished: 2670 packages removed (disk space saved: 8.49 GiB)