Difference between revisions of "CacheClean"
(This version properly handles packages with names w/o architecture specified (e.g. 'colordiff-1.0.9-1.pkg.tar.gz'). Also, it displays the size of the deleted packages in kilobytes, megabytes, and gigabytes all at once.) |
(→Code: updated link to new github repo) |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Scripts | + | [[Category:Scripts]] |
− | [[Category:Package management | + | [[Category:Package management]] |
+ | [[zh-CN:CacheClean]] | ||
+ | Cacheclean is python script to clean {{ic|/var/cache/pacman/pkg}} allowing users to specify how many package versions should be retained. In function, it is similar to {{ic|pacman -Sc}} except users select how many old versions to keep. Another difference is unlike, {{ic|pacman -Sc}} cacheclean does not discriminate against packages that are not currently installed as it inspects {{ic|/var/cache/pacman/pkg}}. | ||
− | + | == Installation == | |
+ | [[AUR]] package: {{AUR|cacheclean}} | ||
− | + | == Usage == | |
− | + | {{bc|cacheclean {-p} {-v} <# of copies to keep> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
# of copies to keep - (required) how many generations of each package to keep | # of copies to keep - (required) how many generations of each package to keep | ||
-p - (optional) preview what would be deleted; forces verbose (-v) mode. | -p - (optional) preview what would be deleted; forces verbose (-v) mode. | ||
− | -v - (optional) show deleted packages. | + | -v - (optional) show deleted packages.}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Code == | |
− | + | For those wishing to contribute, the script's source code is hosted in [https://github.com/graysky2/cacheclean/tree/master/cacheclean this github repository]. To simplify updates, please fork and send a pull request with updates/changes. | |
− | |||
− | + | == See also == | |
− | + | *Author's original forum thread: [http://bbs.archlinux.org/viewtopic.php?id=9104 A utility for cleaning /var/cache/pacman/pkg] | |
− | |||
− | |||
− |
Revision as of 14:00, 4 August 2012
zh-CN:CacheClean
Cacheclean is python script to clean /var/cache/pacman/pkg
allowing users to specify how many package versions should be retained. In function, it is similar to pacman -Sc
except users select how many old versions to keep. Another difference is unlike, pacman -Sc
cacheclean does not discriminate against packages that are not currently installed as it inspects /var/cache/pacman/pkg
.
Contents
Installation
AUR package: cachecleanAUR
Usage
cacheclean {-p} {-v} <# of copies to keep> # of copies to keep - (required) how many generations of each package to keep -p - (optional) preview what would be deleted; forces verbose (-v) mode. -v - (optional) show deleted packages.
Code
For those wishing to contribute, the script's source code is hosted in this github repository. To simplify updates, please fork and send a pull request with updates/changes.
See also
- Author's original forum thread: A utility for cleaning /var/cache/pacman/pkg