At 23:42 Uhr -0700 31.01.2002, Craig W. Wright wrote:
>On Thu, 2002-01-31 at 19:45, Cyril Niklaus wrote:
>>  Hello all,
>>
>>  Just a quick question, is there a preferred way or tool to "clean up"
>>  one's /sw directory of old tarballs and debs, instead of going through
>>  all the sub folders and deleting things by hand?
>>
>>  Thanks
>>  Cyril
>>
>>
>
>Something like
>
>find /sw -name \*.deb -exec rm -f {} \;
>find /sw -name \*.tar.gz -exec rm -f {} \;
>
>Although you may want to try the commands without the -exec portion
>first just to see what is there so you don't wipe out things you
>want to keep.
>

Uhm, I would think twice before doing that. It deletes *all* deb 
files, and *all* tar balls (well, not really all, it will miss out 
all the tar.bz2 and .tar.Z files, and other sources, too).

if you really want to wipe *all* source files, you can just do a
  sudo rm -rf /sw/src/*

But you should keep in mind that if you do that, you will have to 
redownload all sources if you ever need to rebuild the package in 
question. Likewise, if you uninstall a package and want to reinstall 
it later, you will have to rebuild it from scratch since you deleted 
the .deb files.


So right now there is no "official" way to clean up your system. I 
have in my head a sketch for a simple command that will remove all 
unused source files. Removing all "unused" .deb files is a bit more 
tricky since it depends on how exactly you'd define "unused". E.g. do 
you want to remove all .deb files for packages that are not 
installed? I wouldn't like that, but maybe others do. Or, something 
I'd prefer, remove all .deb's for which there is a newer version 
around. Whatever, it has to be implemented first :)


Max
-- 
-----------------------------------------------
Max Horn
Software Developer

email: <mailto:[EMAIL PROTECTED]>
phone: (+49) 6151-494890

_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to