-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
ansible roleansible template (.j2)ansible vararchlinuxArchLinux distro related issuesArchLinux distro related issueshelp wantednice to have
Description
- according to Clearing the package cache info, one can create a hook that only keeps the current version of installed package and the previous one in cache
- create a pacman hook that deletes previous versions of packages, and only keeps the current and 1 pre-version of package
- the
man alpm-hooks(5)
provides all the possible options - according to this thread | bbs.achlinux.org a pacman hook looks like this:
# hook-example1.hook
[Trigger]
Operation = Upgrade
Operation = Install
Operation = Remove
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache...
When = PostTransaction
Exec = /usr/bin/paccache -r
# hook-example2.hook
[Trigger]
Operation = Remove
Operation = Install
Operation = Upgrade
Type = Package
Target = *
[Action]
Description = Keep the last cache and the currently installed.
When = PostTransaction
Exec = /usr/bin/paccache -rvk2
Metadata
Metadata
Assignees
Labels
ansible roleansible template (.j2)ansible vararchlinuxArchLinux distro related issuesArchLinux distro related issueshelp wantednice to have