How can I clean the cache of debtorrent?

Simon Pepping spepping at leverkruid.eu
Sun Nov 9 15:31:33 UTC 2008


I would rather clean packages older that a certain date. I did

/etc/init.d/debtorrent-client stop
find /var/cache/debtorrent -not -type d -ctime +15 -delete
/etc/init.d/debtorrent-client start

But that did not achieve the desired result. After startup some of the
deleted packages were refetched. Apparently I also have to tell
debtorrent that those packages are not needed any more.

Any suggestion how I can improve on this effort?

Regards, Simon

On Mon, Nov 03, 2008 at 10:05:29AM -0800, Cameron Dale wrote:
> On Mon, Oct 20, 2008 at 11:15 AM, Simon Pepping <spepping at leverkruid.eu> wrote:
> > How can I clean the cache of debtorrent? I did this by find, also cleaning empty directories, but that was too aggressive, and brought debtorrent in a non-startable state:
> >
> > 2008-10-18 09:37:35,499 MainThread DebTorrent.launchmanycore ERROR SYSTEM ERROR - EXCEPTION GENERATED
> > Traceback (most recent call last):
> > ...
> >  File "/var/lib/python-support/python2.5/DebTorrent/download_bt1.py", line 952, in loadState
> >    d = self.pickled_data['resume data']['priority']
> > KeyError: 'resume data'
> >
> > Or maybe it was due to the fact that I forgot to stop debtorrent client when I did the cleanup. I solved the problem by purging and reinstalling debtorrent. Maybe it would have sufficed to bring the cache back to a clean state: /var/cache/debtorrent/.DebTorrent/{data,piece,torrent}cache?
> 
> Deleting the entire cache probably would have worked fine if
> DebTorrent was not running. Just remember to do an apt-get update
> after you restart it so it can find the right torrents again.
> 
> > Which parts of the cache must be kept? Can you suggestions for a good script for this, that can run in a cron job?
> 
> I don't think anything needs to be kept if you're removing all the
> downloaded packages in the cache. For more advanced ideas, see this
> wishlist bug:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466916
> 
> Thanks,
> Cameron

-- 
Simon Pepping
email: spepping at leverkruid.eu
home page: http://www.leverkruid.eu
IM (jabber): spepping at amessage.eu
public key: http://www.leverkruid.eu/personal/5F298824.asc
fingerprint: BE31 6D87 8F7C F483 41EF  1356 3E2A 6FC2 5F29 8824



More information about the Debtorrent-devel mailing list