[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Reclaiming Disk Space



On Sat, Sep 27, 2003 at 05:46:42PM -0400, brett lyon wrote:
> 
> Does anybody have a few good tips on how to recover
> disk space? I am at 96% on my main partition and would
> like to get some of that space back so I am:
> 
> -deleting unwanted files in my home directory
> -uninstalling unwanted packages like opera etc.
> 
> Can I also delete old kernels?

Yes.

> How?

  rpm -q kernel

to get a listing of the currently installed kernels.  Then, to
uninstall the old ones,

  rpm -e kernel-<version>

Do a "uname -r" to see which kernel you are running to make sure you
don't try to remove a running kernel.  I suppose it won't let you, but
I've not tried, either.

> I have been looking
> for a good doc on how to save/recover disk space but
> have not found a good to-the-point writing yet. 
> 
> thanks
> brett
> 
> Registered Linux user #301116.

Aside from unneeded packages, the next places to look for trash are in
/tmp (although the system does a pretty good job of cleaning that
out), and /var/log.  logrotate should be doing a pretty good job of
rotating out logs and leaving some archived.

The best way to look for disk hogs is to start at the root directory
and 

  du -s *

That will give you the summaries of disk usage (du).  Then drill down
(cd) to the biggest subdirectory and

  du -s *

again.  Don't bother with /usr.  It has the lion's share of installed
RPMs.

Cheers,
-- 
Bob McClure, Jr.             Bobcat Open Systems, Inc.
robertmcclure earthlink net  http://www.bobcatos.com
A chip on the shoulder indicates wood higher up.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]