Skip to content

How to Cleanup Manjaro


This article is largely a copy/paste from a Gist I found on GitHub regarding how to clean-up any Arch Linux based system. For my needs, I use it to clean-up Manjaro.


  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • Remove old config files
  • Find and Remove
    • Duplicates
    • Empty files
    • Empty directories
    • Broken symlinks
  • Find Large files

Clean pkg cache

List packages

ls /var/cache/pacman/pkg/ | less 

Remove all packages except those installed

sudo pacman -Sc 

Remove all files

sudo pacman -Scc

Download manually from archive.

Automatically remove

sudo pacman -S pacman-contrib


paccache -r

Systemd timer

Create file in /etc/systemd/system/paccache.timer with the following contents:

Description=Clean-up old pacman pkg cache



Enable with sudo systemctl start paccache.timer

Pacman post-transaction hook

Remove unused packages

List unused

sudo pacman -Qtdq

Remove unused

sudo pacman -R $(pacman -Qtdq)

Clean home cache

Cache is located in ~/.cache

Config Files

Stored in ~/.config/

Find and remove

Install rmlint package with sudo pacman -S rm lint.