Experiencing low disk area points in Arch Linux? You possibly can release some storage in your system by clearing out the bundle cache.
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:
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.
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
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.
You’re still using the command line, but the default packages are much easier to install.
About The Creator
https://www.makeuseof.com/how-to-clean-package-cache-in-arch-linux/ | Learn how to Clear the Bundle Cache in Arch Linux