How to Remove Pacman Cache on Linux
Free up space by cleaning Pacman cache on Linux with help from Kudu.
By Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
Pacman keeps downloaded package files in its cache so you can reinstall or downgrade packages later without downloading them again. Over time, that cache can grow large, especially on systems that update often or install many packages. The problem is usually caused by old package versions piling up in /var/cache/pacman/pkg and never being cleaned out.
Common Symptoms
- Your Linux drive is running low on free space
/varor/is using much more storage than expected- Pacman cache contains many old package files
- System updates fail because there is not enough disk space
- You notice hundreds of
.pkg.tar.zstfiles in the Pacman cache folder
How to Fix It Manually
-
Open a terminal.
- On most Linux desktops, press
Ctrl+Alt+T. - You can also open your app menu and search for Terminal.
- On most Linux desktops, press
-
Check how much space the Pacman cache is using.
- Run:
du -sh /var/cache/pacman/pkg - This shows the total size of the cache folder so you know how much space you may recover.
- Run:
-
Remove old cached packages but keep the most recent versions.
- Run:
sudo paccache -r - This is the safest standard cleanup method. It removes older package versions and keeps a few recent copies.
- If
paccacheis not available, install it with:sudo pacman -S pacman-contrib
- Run:
-
If you want a more aggressive cleanup, keep only one version of each package.
- Run:
sudo paccache -rk1 - This keeps just one cached version of each installed package.
- If you also want to clean uninstalled package caches, use:
sudo paccache -ruk0
- Run:
-
Clear the entire Pacman cache if you need maximum space back.
- Run:
sudo pacman -Scc - Pacman will ask for confirmation. Type
ywhen prompted. - Be careful: this removes all cached packages, so you will need to re-download packages if you reinstall or downgrade later.
- Run:
-
Verify the cleanup worked.
- Check the cache size again:
du -sh /var/cache/pacman/pkg - You can also check free disk space with:
df -h
- Check the cache size again:
-
Optional: automate future cache cleanup.
- To avoid the cache growing again, use
paccacheregularly after updates. - Many users set up a systemd timer or run cache cleanup manually every few weeks.
- To avoid the cache growing again, use
Fix It Automatically with Kudu
If you do not want to search through cache folders and cleanup commands yourself, Kudu can help automate disk cleanup and identify large temporary or leftover files that waste space. It gives you a simpler way to find storage problems and fix them without digging through system directories manually.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Remove App Cache on Linux
Clean application cache on Linux to recover space and reduce clutter using Kudu.
How to Remove APT Cache on Linux
Free up storage by cleaning APT cache files on Linux with Kudu’s cleanup tools.
How to Remove Browser Cache on Linux
Delete browser cache on Linux to free up storage and improve browsing performance with Kudu.
How to Remove DNF Cache on Linux
Delete DNF cache on Linux and reclaim storage space safely using Kudu’s cleanup tools.