Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

automatically clean package cache in Arch Linux

# the package cache will be cleaned automatically after every pacman transactions (like upgrade, install, remove)
sudo mkdir /etc/pacman.d/hooks
sudo nano /etc/pacman.d/hooks/clean_package_cache.hook

# add
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -r
Source by ostechnix.com #
 
PREVIOUS NEXT
Tagged: #automatically #clean #package #cache #Arch #Linux
ADD COMMENT
Topic
Name
8+2 =