You are not logged in.

#1 2009-12-16 07:20:40

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

deleting "older" files from /var/cache/pacman/pkg

I suspect this is more of a bash script question than a pacman question but it's related so here goes: how would one go about deleting older versions of packages (files in general)?  I am hesitant to use a date restriction because some packages may be current and just older than the restriction.  Perhaps keeping say the latest three versions of any given package might be a good idea.  How have folks been doing this if at all?

Offline

#2 2009-12-16 07:39:49

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: deleting "older" files from /var/cache/pacman/pkg

Pacman has some cache cleaning capabilities (see man pacman.conf). There are also other scripts posted here on the forums.

Offline

#3 2009-12-16 10:32:39

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: deleting "older" files from /var/cache/pacman/pkg

Personally I keep the current version of packages in the /var/cache/pacman/pkg folder, and I also keep the preceding version in another partition, to be able to downgrade in case of problem with the newer package.
So I always have two versions available.

Offline

#4 2009-12-16 12:27:59

Dirk Sohler
Member
From: Hamburg, Germany
Registered: 2009-10-03
Posts: 109

Re: deleting "older" files from /var/cache/pacman/pkg

graysky wrote:

How have folks been doing this if at all?

I'm using schlunix.org

Offline

#5 2010-02-09 21:26:45

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

Re: deleting "older" files from /var/cache/pacman/pkg

Allan wrote:

Pacman has some cache cleaning capabilities (see man pacman.conf). There are also other scripts posted here on the forums.

Anyone using any of the scripts that Allan referred to?  I haven't had much luck find any.  The behavior I'm looking for is to have pacman clean the /var/cache/pacman/pkg dir keeping two versions of each package (current and one before).  I know -Sc will keep current, but I don't know how to go about automating the keeping of one previous version.

Offline

#6 2010-02-09 22:17:49

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: deleting "older" files from /var/cache/pacman/pkg

CacheClean?

(Wiki to the rescue!)


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#7 2010-02-10 00:24:45

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

Re: deleting "older" files from /var/cache/pacman/pkg

Killer, just what I was looking for!  Thanks very much for point me to that.

Last edited by graysky (2010-02-10 00:32:12)

Offline

Board footer

Powered by FluxBB