Skip to main content

Clean XBPS Cache on Void Linux - Free Disk Space

On Void Linux, XBPS keeps downloaded packages in a cache directory. You can clean it safely like this:


βœ… Remove all cached packages
#

Run as root:

sudo xbps-remove -O

This is the recommended wayβ€”it deletes old cached packages in:

/var/cache/xbps/

🧹 Remove only obsolete packages (not installed anymore)
#

sudo xbps-remove -o

πŸ“¦ Clean manually (optional)
#

If you want to delete everything in the cache:

sudo rm -rf /var/cache/xbps/*

⚠️ This is safe, but xbps-remove -O is cleaner because it understands the package database.


πŸ” Check cache size before cleaning
#

du -sh /var/cache/xbps

Youcef
Author
Youcef
My name is youcef and i’m linux user who fool in love with linux , like free and open software .