You are not logged in.

#1 2010-12-20 19:16:05

whitetimer
Member
Registered: 2010-05-23
Posts: 207

Whats The Best Way To Clean The System Cache ?

Hi All

Besides running  'sudo pacman -Scc' how else can you clean the system cache in arch ?

Many Thanks

Offline

#2 2010-12-20 19:18:27

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: Whats The Best Way To Clean The System Cache ?

rm /var/cache/pacman/pkg/*

You could simply delete them using rm, but bear in mind that will wipe all your stored packages instead of just the uninstalled ones

Last edited by SS4 (2010-12-20 19:18:53)


Rauchen verboten

Offline

#3 2010-12-20 19:28:01

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Whats The Best Way To Clean The System Cache ?

And you can make an alias for

su -c 'rm -v /var/cache/pacman/pkg/*'

Edit ~/.bashrc and add:

alias cc-cache="su -c 'rm -v /var/cache/pacman/pkg/*'"

Relogin.

"cc-cache" is your new command for this.

Last edited by Mr. Alex (2010-12-20 19:28:35)

Offline

#4 2010-12-20 19:30:55

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Whats The Best Way To Clean The System Cache ?

Why use anything else than -Scc?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2010-12-20 19:31:23

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Whats The Best Way To Clean The System Cache ?

Why would you not want to use pacman to clear the cache?

What's the advantage of using 'rm'?

Offline

#6 2010-12-20 19:32:41

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

Re: Whats The Best Way To Clean The System Cache ?

SS4 wrote:
rm /var/cache/pacman/pkg/*

You could simply delete them using rm, but bear in mind that will wipe all your stored packages instead of just the uninstalled ones

'-Scc' does the same thing. Try 'pacman -Sc' instead.

Offline

#7 2010-12-20 19:38:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Whats The Best Way To Clean The System Cache ?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2010-12-20 21:13:36

whitetimer
Member
Registered: 2010-05-23
Posts: 207

Re: Whats The Best Way To Clean The System Cache ?

Many Thanks ... Will stick to pacman -Scc

Offline

#9 2010-12-20 21:19:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Whats The Best Way To Clean The System Cache ?

@jason - How does your version differ from the python version http://aur.archlinux.org/packages.php?ID=37572?

To the op - the python script is the way to go because you can select how many old versions you want to keep... for example 2:

# cacheclean 2

Last edited by graysky (2010-12-20 21:20:49)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2010-12-20 21:19:57

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Whats The Best Way To Clean The System Cache ?

karol wrote:

...Try 'pacman -Sc' instead.

This.

Offline

#11 2010-12-20 21:30:09

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Whats The Best Way To Clean The System Cache ?

Misfit138 wrote:
karol wrote:

...Try 'pacman -Sc' instead.

This.

Not to mention CleanMethod in pacman.conf(5)

Last edited by Mr.Elendig (2010-12-20 21:30:41)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2010-12-20 22:36:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Whats The Best Way To Clean The System Cache ?

graysky wrote:

@jason - How does your version differ from the python version http://aur.archlinux.org/packages.php?ID=37572?

The author describes the difference thus:

AugustePop wrote:

The original "pacman -Sc" command cleans everything but the installed packages; the AUR package cleancache retains a certain number of every package, whether it is currently installed or not.

This simple application i have written retains a certain number of every installed package, including 1 currently used. All other package caches are deleted.

https://bbs.archlinux.org/viewtopic.php?pid=841774


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB