[vox-tech] HD filling up - what can we delete?

Bill Kendrick nbs at sonic.net
Mon Feb 27 13:15:05 PST 2006


On Mon, Feb 27, 2006 at 10:55:04AM -0800, Hookand Crook wrote:
> Our small HD is getting a mite full and we notice that in various
> places we might do some house cleaning.
> 
> In usr/src/kernels I find all the old kernels we're not using.
> Currently we are using 2.6.15-1.1831_FC4-i686 and there is a bunch of
> older stuff there that is not being used. Could I just dump that?
> 
> Are there any other places that I might do some additional house
> cleaning to free up some space? Especially in the Mozilla folder?

Depending on your distro, you might have a cache of package files.

My HDD is very close to full (well, that last 1% is pretty large, but
when it gets close to there, regular users can no longer create files
on my root partition, which is bad, since that's where /tmp lives).

So, as I run Debian, I regularly do this after any install or update+upgrade:

  sudo aptitude clean
  sudo aptitude autoclean

Checking "/var/" for large log files that you might want to rotate or
disable could be good.

Removing apps that you never use (I got rid of some games I never played
that included MBs of music and graphics, and I got rid of OpenOffice.org,
since I stick with KOffice) could be a good idea, too.

FileLight (a KDE GUI app) is a great tool for looking at your disk usage
graphically.  There are others, such as "xdf", too.

And there are always command-line tools like "find" (with "-size" searching)
and "du".  For example:

  du -x / | sort -n 2> /dev/null

That is:

  du    == Disk Usage ("estimate file space usage")
  -x    == aka "--one-file-system": skip directories on different filesystems
  /     == start from your root directory (change depending on your needs;
           see output of "mount" and "df")
  |     == pipe the output to...
  sort  == sort the output
  -n    == numerically (versus in terms of ASCII... i.e., 2 is less than 10 :)
  2>    == take any stderr output
  /dev/null == and throw it away

Best if run as root, otherwise any dirs that your regular user can't read
will be ignored (and due to my "2> /dev/null" (optional, BTW!), you'll not
see errors about those).

Hope that helps!
  
-- 
-bill!                                    Tux Paint 2006 wall calendar,
bill at newbreedsoftware.com                CDROM, bumper sticker & apparel
http://www.newbreedsoftware.com/       http://www.cafepress.com/newbreedsw


More information about the vox-tech mailing list