How to Clean the Package Cache in Arch Linux

Experiencing low disk area points in Arch Linux? You possibly can release some storage in your system by clearing out the bundle cache.

how to clear package cache in arch linux

So that you’re operating Arch Linux and also you enter sudo pacman -Syu to replace your system, however the pacman utility says you do not have sufficient disk area. What occurred? You possible simply have to empty your system’s bundle cache.

What Occurred to My Disk House?

When you’re questioning the place your disk area went, the possible wrongdoer is Arch’s bundle cache. Arch Linux shops a duplicate of every bundle you obtain within the /var/cache/pacman/pkg/ listing. This contains each bundle you obtain, even upgrades. You possibly can roll again to earlier variations in case an replace breaks a bundle, which is useful on a rolling-release distro like Arch.

Whereas having a number of copies of a bundle is helpful for restoration, it does take up area. You would possibly overlook to take away older variations of packages. The builders of Arch Linux determined it could be higher for the person to handle this cache quite than constructing some computerized utility to eliminate outdated variations. So how do you get your area again?

Clearing the Bundle Cache on Arch Linux

Luckily, the pacman utility allows you to clear away the bundle cache. To do this, sort:

pacman -Sc

This can take away any packages from the cache that aren’t presently put in. Including one other -c flag within the command will take away all the cached packages.

pacman -Scc

Associated: How to Install and Remove Packages in Arch Linux

The paccache Utility

Cleansing the bundle cache with pacman is an all-or-nothing proposition. You will need to have some older variations to fall again on whereas nonetheless retaining sufficient disk area. The paccache utility will enable you to stability these wants. It is a part of the pacman-contrib bundle.

To put in it, sort:

sudo pacman -S pacman-contrib

To take away all of the cached packages aside from the most recent three variations, sort:

sudo paccache -r

If you wish to maintain the most recent model, use the -k possibility, specified with the variety of newest packages you need. On this case, one:

sudo paccache -rk1

Associated: How to Install Arch Linux in VirtualBox Using the Guided Installer

Now You Have Extra Disk House

Arch takes extra effort to manage than different distros. Bundle administration isn’t any exception, however with the following pointers, you’ll be able to reclaim your disk area whereas nonetheless with the ability to fall again on older packages if you must.

If you have not tried Arch Linux but, or if the advanced set up course of feels formidable to you, you’ll be able to simply set up Arch Linux utilizing the guided installer.

arch linux logo feature
Arch Linux Now Comes With Easier to Use Guided Installer

You’re still using the command line, but the default packages are much easier to install.

Read Next

About The Creator | Learn how to Clear the Bundle Cache in Arch Linux


Inter Reviewed is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – The content will be deleted within 24 hours.

Related Articles

Back to top button