Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-17-2002, 01:51 PM   #1
rudar
Prospect
 
Join Date: Jan 2002
Posts: 48
can I delete .debs?

I seem to have about 100MB of .deb files sitting under /sw/fink, and would like to release some disk space for more important things (er, well, maybe just for Warcraft, but still...) AFAIK, the .deb files are used during installation, and fink keeps them around to save the effort of re-downloading and re-compiling them if/ when I need to rebuild a package with different options or whatever. If that's the case, there should be no problem deleting these files (along with the ones in /sw/src) Or have I misunderstood?
rudar is offline   Reply With Quote
Old 07-17-2002, 04:40 PM   #2
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
rudar,


If you just want to clean up the /sw/src folder of some packages then, the easiest way to do it is to use 'emacs' in dired mode.

"You can use OSX's /usr/bin/emacs:

sudo /usr/bin/emacs /sw/src

It goes into dired mode automatically. You go down the list of files and directories, you flag the files you want to get rid of by hitting "d" and the directories hitting "m". After the selection, you hit "x" to delete the files and "!" then "rm -rf" to delete the directories. Takes you less than 5 minutes even for a very populated and long neglected /sw/src directory."

Or you could manually go thru the dirs and delete the files you don't need anymore. A lot of work if you want to clean everything, but you can save lots of space.

If you would really need the all the space, you could delete everything from /sw/src.

So, if you really need 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, you could delete all *.deb files in your /sw heirarchy without ill effect, other than possibly needing to rebuild things later. They don't affect anything at runtime. Then, I would use one of the following commands:

sudo find /sw -name "*.deb" -exec rm {} \;

or,

sudo find /sw -name '*.deb' -exec /bin/rm -- {} \;

The single quotes suppress sh/ksk/bash/ filename expansion.

Full path to known good rm.

'--' prevents rm from misinterpreting filenames which begin with a
dash.

If you use use /sw/fink as your target directory, it should make things go a bit quicker (and is less typing than "/sw/fink/debs /sw/fink/dists").

But again remember, 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.

You can also clean up the symlink list in /sw/fink/debs.

Although it doesn't free a lot of space, you can get rid of broken symlinks sitting around.

If you use bash you can run:

for DEB in /sw/fink/debs/*.deb ; do (file $DEB |grep broken) && sudo rm
$DEB; done

If you only use apt-get to obtain your .deb files (i.e. the binary distro) and want to delete the old deb files via Fink:

% sudo apt-get autoclean

Also, with fink package manager version 0.9.13 coming out soon, we will have a 'fink cleanup' command to do the cleaning job.


Have a good cleaning.


Cheers...

Last edited by sao; 07-18-2002 at 01:41 AM.
sao is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.