Package Details: paccache-hook 1.1.1-2

Git Clone URL: https://aur.archlinux.org/paccache-hook.git (read-only, click to copy)
Package Base: paccache-hook
Description: A configurable hook to cleanup the pacman package cache using paccache
Upstream URL: None
Keywords: cleanup hook paccache pacman
Licenses: BSD
Conflicts: pacman-cleanup-hook
Submitter: Skycoder42
Maintainer: Skycoder42
Last Packager: Skycoder42
Votes: 40
Popularity: 2.20
First Submitted: 2019-03-23 10:57 (UTC)
Last Updated: 2023-08-16 05:22 (UTC)

Pinned Comments

Skycoder42 commented on 2019-03-23 11:00 (UTC)

This packages was inspired by pacman-cleanup-hook and builds on top of it by making the hook configurable. For a basic, non-configurable cleanup, check out that one!

Latest Comments

kageyama commented on 2024-01-03 19:06 (UTC) (edited on 2024-01-03 19:10 (UTC) by kageyama)

I lost cache of uninstalld package because of uninstalled_keep=0 and even though i read the comment first, i didn't know any way to prevent it.

as mentioned by @archz, it would be nice to have those as defaults. i personally liked @escorares args, as it would remove cache of uninstalld package after 30 days.

setting uninstalled_keep=1 wil mean the package will be never removed unless explicitly done.

escorares commented on 2023-09-14 18:04 (UTC) (edited on 2023-09-14 18:06 (UTC) by escorares)

I personally configured paccache-hook.conf so that if I change my mind and install a package back, it doesn't have to be downloaded again if 30 days haven't passed.

uninstalled_extra_args="'--min-mtime=30 days ago'"

uninstalled_keep=0 can stay since

  --min-atime <time>, --min-mtime <time>
      Keep packages with an atime/mtime that is not older than the
      time given, **even if this means keeping more than specified
      through the --keep option.** Accepts arguments according to
      info "Date input formats", e.g.  30 days ago.

archz commented on 2023-08-20 02:21 (UTC) (edited on 2023-08-20 04:59 (UTC) by archz)

This is great, thank you!

I'd like to offer two suggestions for consideration (in light of a mistake I made):

1) set default uninstalled_keep=1 -> It's safer than 0. The user may need to reinstall a package from their cache in the event of an erroneous uninstall.

2) set default extra_args=-v -> The hook runs immediately after being installed, and may remove unexpected packages (as it did for me). With verbose logging, the user can easily determine what was removed. I see another user below mentioned they like verbosity off, but it's easier to remove the flag than it is to deal with lost info from a silent execution.

Thanks!

MarsSeed commented on 2023-08-14 18:03 (UTC)

And thank you for this package! Appreciated!

MarsSeed commented on 2023-08-14 17:53 (UTC)

@Skycoder42, please kindly install your custom BSD license in package(). Thank you in advance.

griffi-gh commented on 2023-04-29 00:27 (UTC)

was annoyed by pacman-cleanup-hook's verbose output and lack of config.
this is perfect!
thank you <3

miladiir commented on 2022-11-27 09:50 (UTC)

Thanks, really useful.

puminya commented on 2021-12-15 17:19 (UTC) (edited on 2021-12-15 17:20 (UTC) by puminya)

Looks like there's a bug in the for loop in paccache-hook.sh:

for cdir in $cache_dirs

only works with the first value in the array.

for cdir in ${cache_dirs[@]}

iterates over all values. That's bash syntax though...

Skycoder42 commented on 2019-03-23 11:00 (UTC)

This packages was inspired by pacman-cleanup-hook and builds on top of it by making the hook configurable. For a basic, non-configurable cleanup, check out that one!