You are not logged in.

#1 2013-01-15 02:09:41

swatquest
Member
Registered: 2013-01-07
Posts: 11

paccache- remove the cache of uninstalled packages

https://wiki.archlinux.org/index.php/Pacman_Tips#Selectively_clean_cache wrote:

     Because paccache does not remove the cache of uninstalled packages, you can display them with diff from diffutils and then optionally delete each package in the /var/cache/pacman/pkg directory:

pacman -S diff
diff -y <(pacman -Qq) <(ls /var/cache/pacman/pkg/ | sed 's/^\(.*\)-[^-]*-[^-]*-[^-]*$/\1/' | sort -u)

If you want to display the output with colors install colordiff:

pacman -S colordiff
colordiff -y <(pacman -Qq) <(ls /var/cache/pacman/pkg/ | sed 's/^\(.*\)-[^-]*-[^-]*-[^-]*$/\1/' | sort -u)

LC_MESSAGES - pacman.mo

edited : removed

paccache -h
    -k  <num>        keep 'num' of each package in 'cachedir' (default: 3).
    -u               target uninstalled packages.

# paccache -dvuk0

Last edited by swatquest (2013-01-15 18:44:38)

Offline

#2 2013-01-15 02:39:09

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: paccache- remove the cache of uninstalled packages

tfw wrote:

Because paccache does not remove the cache of uninstalled packages

I've no idea what this means, but paccache can definitely remove uninstalled packages. Hell, even pacman alone can remove uninstalled packages.

Last edited by falconindy (2013-01-15 02:40:18)

Offline

#3 2013-01-15 02:57:08

swatquest
Member
Registered: 2013-01-07
Posts: 11

Re: paccache- remove the cache of uninstalled packages

falconindy,
https://wiki.archlinux.org/index.php/Pa … lean_cache

Selectively clean cache
paccache from pacman-contrib
paccache -rv

It does not remove all.
Depends on option
<num> k-keep 'a' of each package in 'CacheDir'

Last edited by swatquest (2013-01-15 03:05:36)

Offline

#4 2013-01-15 03:05:17

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,092
Website

Re: paccache- remove the cache of uninstalled packages

I'm familiar with paccache -- I wrote it. I'm baffled as to why the wiki claims paccache doesn't do what I wrote it to do.

Offline

#5 2013-01-15 03:33:22

swatquest
Member
Registered: 2013-01-07
Posts: 11

Re: paccache- remove the cache of uninstalled packages

Paccache is very useful.
Congratulations.

Ex.
sudo pacman -S --noconfirm  gedit slim slim-themes  nautilus && sudo pacman -Rscn --noconfirm gedit slim slim-themes  nautilus

target (6): exempi-2.2.0-1  gnome-desktop-1:3.6.2-1  gedit-3.6.2-2
           nautilus-3.6.3-1  slim-1.3.4-4  slim-themes-1.2.3-6

paccache -h
    -k  <num>        keep 'num' of each package in 'cachedir' (default: 3).
    -u               target uninstalled packages.

# paccache -dvuk0
==> Candidate packages:
exempi-2.2.0-1-x86_64.pkg.tar.xz
gedit-3.6.2-2-x86_64.pkg.tar.xz
gnome-desktop-1:3.6.2-1-x86_64.pkg.tar.xz
nautilus-3.6.3-1-x86_64.pkg.tar.xz
slim-themes-1.2.3-6-any.pkg.tar.xz
slim-1.3.4-4-x86_64.pkg.tar.xz

==> finished dry run: 6 candidates (diskspace saved: 10.22 MiB)

Last edited by swatquest (2013-01-15 03:47:09)

Offline

#6 2013-01-15 03:41:35

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,365
Website

Re: paccache- remove the cache of uninstalled packages

I'll keave falconindy to follow-up paccahce.   But this is exactly what "pacman -Sc" does with "CleanMethod = KeepInstalled" (default) in pacman.conf

Offline

#7 2013-01-15 05:59:33

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,790

Re: paccache- remove the cache of uninstalled packages

swatquest, I guess you previously posted up a script here, hence the placing in Community Contributions, but seeing as it has been (presumably) removed and falconindy's paccache does the same thing, I'm going to move this to 'Pacman and Package Update Issues'. I'd also suggest that you rename the thread title to something a bit more suitable to where the discussion has gone, as a courtesy to those poor googlers from the year 2014.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB