You are not logged in.
How would I make yaourt/pacman automatically clean cache and remove unused repositories after successfully installing or upgrading packages?
Offline
'&&' can be used to run the command only if the first is successful:
pacman -Syu && pacman -Scc --noconfirmOr you can put this in ~/.bashrc so that when you run the command 'update' the cache will be cleaned after:
alias update='pacman -Syu && pacman -Scc --noconfirm'Last edited by dyscoria (2008-06-01 17:03:11)
flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)
Offline
Much thanks.
I figured out another way, while I was at it:
alias pacman='yaourt'
yaourt () {
if /usr/bin/yaourt $*; then
if [[ "$1" == "S" || "$1" == *y* || "$1" == *u* ]]; then
/usr/bin/yaourt -SccCc --noconfirm
fi
fi
}Last edited by MetalRandomist (2008-06-02 19:32:23)
Offline
It looks like with the yaourt -SccCc you will be deleting all your new .pacnew files. I would manually do that or you might have problems later on.
Offline
I wouldn't recommend automatically deleting your cache after an upgrade anyways. What if you need/want to revert?
Offline
I wouldn't recommend automatically deleting your cache after an upgrade anyways. What if you need/want to revert?
They are f*cked ![]()
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline