Skip to content

Instantly share code, notes, and snippets.

@vicente-gonzalez-ruiz
Created November 20, 2020 06:13
Show Gist options
  • Save vicente-gonzalez-ruiz/e226e4e04a6f965446cc77c3a016dc5c to your computer and use it in GitHub Desktop.
Save vicente-gonzalez-ruiz/e226e4e04a6f965446cc77c3a016dc5c to your computer and use it in GitHub Desktop.
# Option 1 (manually):
sudo pacman -Scc
# Option 2 (automatically) (see https://ostechnix.com/recommended-way-clean-package-cache-arch-linux/):
## 1. Create a file /etc/pacman.d/hooks/clean_package_cache.hook:
sudo mkdir /etc/pacman.d/hooks
sudo nano /etc/pacman.d/hooks/clean_package_cache.hook
## 2. Add the content:
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment