[Discuss] free up space on a RedHat RHEL 5 system

Mick Timony - Verizon michael.timony at verizon.net
Tue Oct 23 15:02:57 EDT 2012


Some tips for freeing up space:
1. Remove older unused kernels and related source files and header files.
2. Remove unused or unnecessary packages.
3. Clean up /tmp (if it's mounted under /) a reboot should do the trick.

If /boot is mounted under / and you've upgraded kernels over the years then
you should be able to free up a few hundred megabytes by removing unused
older kernels (at least this is what happens on my Debian based boxes). As
a fail-safe I always keep at least 2 kernels in /boot, the latest and the
previous known working kernel.

Also /usr/src may have kernel sources and/or header files for older kernels
that you no longer need and you should be able to remove those also. Just
make sure to use the package manager to remove any older kernels and kernel
sources or header files.

To find packages on  Red Hat system and sort them size the following should
work:
rpm -qa --queryformat="%{NAME} %{SIZE}\n" | sort -k 2 -n

The hard is trying to figure which packages to remove. If this is server
and you normally use the command line then remove any X based and just ssh
in, if it's a desktop then removing games can often free up a lot of space.

As Scott said, what does "dh -h" show?

On Tue, Oct 23, 2012 at 2:24 PM, Scott Ehrlich <srehrlich at gmail.com> wrote:

> On Tue, Oct 23, 2012 at 2:18 PM, Dan Ritter <dsr at randomstring.org> wrote:
> > On Tue, Oct 23, 2012 at 02:12:03PM -0400, John Malloy wrote:
> >> Does anyone have suggestions on how to free up space   on a RedHat
>  RHEL 5
> >> system?
> >>
> >>
> >> It is an   ext3  file system
> >>
> >> It's  root partition is totally (100%) full
> >>
> >>
> >> /var   is on a separate partition.
> >>
> >>
> >> I cannot seem to locate any unnecessary file to delete.
> >
> > Do you have free space on another disk? Can you add one,
> > temporarily, via USB or otherwise?
> >
> > -dsr-
> > _______________________________________________
> > Discuss mailing list
> > Discuss at blu.org
> > http://lists.blu.org/mailman/listinfo/discuss
>
> A review of ls -la / shows nothing special?
>
> Is /home also part of /?   If so, might there be unwanted files in
> someone's directory?
>
> What about system permissions?    Might one or more files have been
> written to places they should not have?
>
> What does a du -h / show?
>
> How about df -h?
>
> Scott
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>



More information about the Discuss mailing list