You are not logged in.
I'm aware of the "pacman -Sc" command but I need a way to delete a package if there is a newer version of it in the cache folder (or maybe in repositories).
Is there any way to do that?
Offline
I searched a bit for you:
https://bbs.archlinux.org/viewtopic.php?pid=841774
Edit: Hmm, I you may do this using "CleanMethod = KeepCurrent" in pacman.conf.
Last edited by lolilolicon (2011-08-06 10:16:55)
This silver ladybug at line 28...
Offline
From pacman manpage:
-c, --clean
Remove packages that are no longer installed from the cache as well as currently unused sync databases to free up disk space. When pacman downloads packages, it saves them in a cache directory. In addition, databases are saved for every sync DB you download from, and are not deleted even if they are removed from the configuration file pacman.conf(5). Use one --clean switch to only remove packages that are no longer installed; use two to remove all packages from the cache. In both cases, you will have a yes or no option to remove packages and/or unused downloaded databases.
So, to remove all packages from cache you have to write option c twice:
pacman -Scc
Last edited by Shark (2011-08-06 10:21:57)
If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau
Registered Linux User: #559057
Offline
you may do this using "CleanMethod = KeepCurrent" in pacman.conf.
thanks. I think this is exactly what I need. although I have already written a script for this! how dumb am I?! I should have checked here sooner.
Offline
lolilolicon wrote:you may do this using "CleanMethod = KeepCurrent" in pacman.conf.
thanks. I think this is exactly what I need. although I have already written a script for this...
I would like to see your script. Could you post it here?
Offline
I would like to see your script. Could you post it here?
I have already posted it here and I've got a couple of nice feedbacks on that
https://bbs.archlinux.org/viewtopic.php … 26#p990126
Offline