You are not logged in.

#26 2011-04-20 10:37:30

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: Simple Application to Clean pacman Cache

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

#27 2011-04-20 12:09:21

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: Simple Application to Clean pacman Cache

ber_t wrote:

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

#28 2011-04-20 12:37:24

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,606
Website

Re: Simple Application to Clean pacman Cache

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

#29 2011-04-20 12:40:48

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: Simple Application to Clean pacman Cache

You forgot to increase the version number in the source code. It still says 1.3...

Offline

#30 2011-04-20 12:50:34

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: Simple Application to Clean pacman Cache

ber_t wrote:

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

#31 2012-01-17 22:08:14

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,606
Website

Re: Simple Application to Clean pacman Cache

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

#32 2012-08-12 11:36:47

archetyp
Member
Registered: 2011-08-07
Posts: 2

Re: Simple Application to Clean pacman Cache

AugustePop wrote:

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

#33 2012-08-13 02:47:45

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: Simple Application to Clean pacman Cache

thank you for the patch. happily merged.

Offline

#34 2014-06-11 05:46:57

Salkay
Member
Registered: 2014-05-22
Posts: 176

Re: Simple Application to Clean pacman Cache

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

#35 2014-06-11 10:17:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,426

Re: Simple Application to Clean pacman Cache

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

#36 2014-06-11 10:57:44

Salkay
Member
Registered: 2014-05-22
Posts: 176

Re: Simple Application to Clean pacman Cache

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

#37 2014-11-01 23:05:33

Moviuro
Member
Registered: 2012-06-03
Posts: 46

Re: Simple Application to Clean pacman Cache

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 wink


KDE 4 (switching to something light), BTRFS over LUKS
Archlinux a lot, FreeBSD more and more, OpenBSD just a bit...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

#38 2014-12-29 12:50:50

danielausparis
Member
Registered: 2010-06-22
Posts: 11

Re: Simple Application to Clean pacman Cache

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

#39 2014-12-29 13:46:54

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,688
Website

Re: Simple Application to Clean pacman Cache

Danielausparis - you need manage aur packages yourself.  Many will need to be rebuilt when a library they depend on gets updated.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#40 2014-12-29 16:28:58

danielausparis
Member
Registered: 2010-06-22
Posts: 11

Re: Simple Application to Clean pacman Cache

Trilby wrote:

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

#41 2014-12-29 16:30:52

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,688
Website

Re: Simple Application to Clean pacman Cache

The version number hasn't increased - it just needs to be rebuilt for the new lib.  Again, just rebuild it.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#42 2014-12-29 16:59:07

danielausparis
Member
Registered: 2010-06-22
Posts: 11

Re: Simple Application to Clean pacman Cache

:-) thanks, it works again perfectly

Offline

#43 2014-12-29 18:31:34

Moviuro
Member
Registered: 2012-06-03
Posts: 46

Re: Simple Application to Clean pacman Cache

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 wink

Last edited by Moviuro (2014-12-29 18:31:51)


KDE 4 (switching to something light), BTRFS over LUKS
Archlinux a lot, FreeBSD more and more, OpenBSD just a bit...
Murphy's rule: The day you need a backup, you tell yourself you should have created some.

Offline

Board footer

Powered by FluxBB