You are not logged in.
Sweet, this is exactly what I've been looking for, thanks AugustePop!
I've added a `-n/--dry-run' option, it behaves in the same way as rsync's -n option, i.e. the -v option is also required to see what would happen without -n:
pkgcacheclean-1.4-dry_run.diff, PKGBUILD.diff.
Offline
Sweet, this is exactly what I've been looking for, thanks AugustePop!
I've added a `-n/--dry-run' option, it behaves in the same way as rsync's -n option, i.e. the -v option is also required to see what would happen without -n:
pkgcacheclean-1.4-dry_run.diff, PKGBUILD.diff.
Happily merged. Thank you for the patch!~
Offline
Nice, nice, thanks!
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
You forgot to increase the version number in the source code. It still says 1.3...
Offline
You forgot to increase the version number in the source code. It still says 1.3...
yeah, new version uploaded. it will always use the pkgver as it's version now. you are so helpful!
Offline
Please update to be compatible with pacman 4.
UPDATE: Thanks, the new version works well.
Last edited by SanskritFritz (2012-01-18 05:41:36)
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
I am using yaourt and configured it to copy the final package into system package cache directory
Well, I like to keep them separated, so I find useful to have a cachedir as option (and maybe there even exist people who have the pacman cache in a non-standard location:D). So I made a patch for it, consider whether you find it to be useful:)
Anyway, thanks for this perfect utility:D
Offline
thank you for the patch. happily merged.
Offline
Hi, this is a slightly old thread, but I wondered if paccache (part of pacman package) has been updated to include all of the functionality of pkgcacheclean? Specifically, the -k and -u flags?
$ paccache -h
usage: paccache <operation> [options] [targets...]
paccache is a flexible pacman cache cleaning utility, which has numerous
options to help control how much, and what, is deleted from any directory
containing pacman package tarballs.
Operations:
-d, --dryrun perform a dry run, only finding candidate packages.
-m, --move <dir> move candidate packages to 'movedir'.
-r, --remove remove candidate packages.
Options:
-a, --arch <arch> scan for 'arch' (default: all architectures).
-c, --cachedir <dir> scan 'cachedir' for packages (default: /var/cache/pacman/pkg).
-f, --force apply force to mv(1) and rm(1) operations.
-h, --help display this help message and exit.
-i, --ignore <pkgs> ignore 'pkgs', comma separated. Alternatively, specify '-' to
read package names from stdin, newline delimited.
-k, --keep <num> keep 'num' of each package in 'cachedir' (default: 3).
--nocolor remove color from output.
-u, --uninstalled target uninstalled packages.
-v, --verbose increase verbosity. specify up to 3 times.
-z, --null use null delimiters for candidate names (only with -v and -vv)
==EDIT==
Hm, having said that, I can't seem to work out how to make paccache work. For my system, `pkgcacheclean -nv 3` gives lots of entries, while `paccache -d` and `paccache -du` and `pkgcacheclean -d -u` give nothing.
Last edited by Salkay (2014-06-11 06:14:24)
Offline
What do you mean by 'give you nothing' - do you get any output when running these commands?
I think it's best to open a new thread.
Offline
Thanks karol. I was just in the process of starting a new thread, when I noticed that someone had updated the wiki.
(By "give nothing" I meant it came back with "no candidate packages found for pruning".) In any case, it's all clear now. This line of the paccache man confused me.
-u, --uninstalled target uninstalled packages.
I interpreted it to mean "target uninstalled packages as well", implying all of these would be removed, whereas it really means one has to run an additional command targeting uninstalled packages alone, specifying the number to retain.
Offline
Bug report: The -d option fails silently if its argument is not ending with a trailing "/".
Thanks for the package, the space won and the less kamikaze solution are greatly appreciated
bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.
Offline
Hi all,
Bug as of latest system upgrade:
# pkgcacheclean -v 3
pkgcacheclean: error while loading shared libraries: libalpm.so.8: cannot open shared object file: No such file or directory
I like very much this utility.
Offline
Danielausparis - you need manage aur packages yourself. Many will need to be rebuilt when a library they depend on gets updated.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Danielausparis - you need manage aur packages yourself. Many will need to be rebuilt when a library they depend on gets updated.
Sure! This package had already numerous upgrades, and I have of course the latest version:
$ yaourt pkgcacheclean
1 aur/pkgcacheclean 1.8.2-1 [installed] (69)
Application to clean the pacman cache
Last edited by danielausparis (2014-12-29 16:29:56)
Offline
The version number hasn't increased - it just needs to be rebuilt for the new lib. Again, just rebuild it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
:-) thanks, it works again perfectly
Offline
BTW, pacman (now) ships with ''paccache'' which does the same (and is written in bash):
paccache -rvk3 -c/var/cache/pacman/pkg -c/var/cache/aur/pkg
Thanks for pkgcacheclean but it seems I won't need it anymore
Last edited by Moviuro (2014-12-29 18:31:51)
bspwm, BTRFS over LUKS
Archlinux a lot, FreeBSD more and more...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.
Offline