Arch Linux: Remove downloaded packages cache and clear memory

My rootfs is very small in size (30 GB), and I am running Arch Linux from past two years and constantly upgrade the new releases and packages. At some point of time my rootfs become full and I couldn’t able to install anything new (not even upgrade the system). When I looked at my rootfs, like which directory is consuming maximum space, found /var/cache/pacman/pkg holds 12 GB of my memory. And it all contains compressed packages which is downloaded when I upgrade my system. All those packages you might not need often, so you can remove all those packages safely using below command.

pacman -Sc

Now I have got my 12 GB free space back. 🙂

For more info Link