Discussion:
Can I delete some files form /usr
Jianping Zhu
2002-04-09 13:57:05 UTC
Permalink
I have a redhat 7.1 linux server. I am running out space of the filesystem
/usr. I need some 20 M space because my boss need to put some files there
imediately. I know it very risk to delete files from there.
Here is the result by using df -s /usr/*
-----------------------
79052 /usr/X11R6
92108 /usr/bin
4 /usr/dict
4 /usr/etc
40 /usr/games
21584 /usr/include
4232 /usr/kerberos
323496 /usr/lib
2288 /usr/libexec
420 /usr/local
68 /usr/man
11444 /usr/sbin
676820 /usr/share
118776 /usr/src
0 /usr/tmp
----------------------
I thought may /usr/games is not essentail. Can delete it? what directory
else can I potentially delete?

Thanks in Advance!


--------------------------------
Jianping Zhu
Department of Computer Science
Univerity of Georgia
Athens, GA 30602
Tel 706 5423900
--------------------------------
Gordon Messmer
2002-04-09 14:49:45 UTC
Permalink
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the filesystem
/usr. I need some 20 M space because my boss need to put some files there
imediately. I know it very risk to delete files from there.
So don't delete files from there. Look at the rpm packages you have
installed, instead, and decide if there are any you can remove.
Post by Jianping Zhu
I thought may /usr/games is not essentail. Can delete it? what directory
else can I potentially delete?
Probably not. Try this to clean it out:
rpm -ef /usr/games/*

Never tried it before, but I think that'll remove the packages
containing files in /usr/games.

Also, try this:
rpm -qa --qf "%-20{SIZE} %{NAME}\n" | sort -n | less

Look for things you can safely delete. Good candidates are -devel
packages, along with the compiler (gcc, make, etc), kernel-headers,
kernel-source (there's a big one!). Look around in /usr/src... if
there's anything left in there after removing the kernel-source package,
they can probably be safely deleted as well (/usr/src/redhat/*/*)
Rick van der Linde
2002-04-09 15:40:23 UTC
Permalink
Post by Gordon Messmer
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the
filesystem
Post by Gordon Messmer
Post by Jianping Zhu
/usr. I need some 20 M space because my boss need to put some files
there
Post by Gordon Messmer
Post by Jianping Zhu
imediately. I know it very risk to delete files from there.
So don't delete files from there. Look at the rpm packages you have
installed, instead, and decide if there are any you can remove.
Post by Jianping Zhu
I thought may /usr/games is not essentail. Can delete it? what
directory
Post by Gordon Messmer
Post by Jianping Zhu
else can I potentially delete?
rpm -ef /usr/games/*
Never tried it before, but I think that'll remove the packages
containing files in /usr/games.
rpm -qa --qf "%-20{SIZE} %{NAME}\n" | sort -n | less
Look for things you can safely delete. Good candidates are -devel
packages, along with the compiler (gcc, make, etc), kernel-headers,
kernel-source (there's a big one!). Look around in /usr/src... if
there's anything left in there after removing the kernel-source package,
they can probably be safely deleted as well (/usr/src/redhat/*/*)
You can link one of those directories (or the new ones) to
another filesystem.

For example link /usr/share to the new mounted /extradisk/usr/share

Rick


#### signature.asc has been removed from this note on April 09 2002 by Rick
van der Linde
David Talkington
2002-04-09 18:05:17 UTC
Permalink
Post by Jianping Zhu
Post by Gordon Messmer
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the
filesystem
Post by Gordon Messmer
Post by Jianping Zhu
/usr. I need some 20 M space because my boss need to put some files
there
Post by Gordon Messmer
Post by Jianping Zhu
imediately. I know it very risk to delete files from there.
Look for things you can safely delete. Good candidates are -devel
packages, along with the compiler (gcc, make, etc), kernel-headers,
kernel-source (there's a big one!). Look around in /usr/src... if
there's anything left in there after removing the kernel-source package,
they can probably be safely deleted as well (/usr/src/redhat/*/*)
I've been known to nuke /usr/share/doc, /usr/share/man, /usr/man on
occasion, too. Might help a bit.

- -d

- --
David Talkington

PGP key: http://www.prairienet.org/~dtalk/0xCA4C11AD.pgp
Anthony E. Greene
2002-04-09 16:24:05 UTC
Permalink
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the filesystem
/usr. I need some 20 M space because my boss need to put some files there
imediately. I know it very risk to delete files from there.
I would recommend adding a drive. Partition the drive and copy /usr/local
onto it. Then edit /etc/fstab and mount /usr/local at the new location. You
can do the same thing with /usr/src.

If an additional disk is not an option, then consider putting /usr/src in a
tarball and storing it on another machine while you work out a long term
solution to the diskspace problem. You shouldn't need the files in /usr/src
until you need to compile something or build an rpm.

I don't recommend anything in /usr be deleted. There are a lot of
dependencies that could cause something to fail. It might also cause
problems with rpm dependencies when upgrading or installing software.

Tony
- --
Anthony E. Greene <mailto:***@pobox.com>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
AOL/Yahoo Chat: TonyG05 HomePage: <http://www.pobox.com/~agreene/>
Linux: the choice of a GNU Generation. <http://www.linux.org/>
Rhugga
2002-04-10 17:15:16 UTC
Permalink
Well, if you really have to delete files and connect get any more disks.

/usr/share contains a lot of informative stuff that can be deleted.
Basically, you can delete anything as long is you do not use it.
However, when you start deleting files belonging to packages you can
break the dependencies and thus make it hard to keep up to date with the
latest updates.

-CC
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the filesystem
/usr. I need some 20 M space because my boss need to put some files there
imediately. I know it very risk to delete files from there.
Here is the result by using df -s /usr/*
-----------------------
79052 /usr/X11R6
92108 /usr/bin
4 /usr/dict
4 /usr/etc
40 /usr/games
21584 /usr/include
4232 /usr/kerberos
323496 /usr/lib
2288 /usr/libexec
420 /usr/local
68 /usr/man
11444 /usr/sbin
676820 /usr/share
118776 /usr/src
0 /usr/tmp
----------------------
I thought may /usr/games is not essentail. Can delete it? what directory
else can I potentially delete?
Thanks in Advance!
--------------------------------
Jianping Zhu
Department of Computer Science
Univerity of Georgia
Athens, GA 30602
Tel 706 5423900
--------------------------------
_______________________________________________
Redhat-list mailing list
https://listman.redhat.com/mailman/listinfo/redhat-list
Tom Pollerman
2002-04-10 18:01:00 UTC
Permalink
On Wed, 10 Apr 2002 10:15:16 -0700
Post by Rhugga
Well, if you really have to delete files and connect get any more disks.
/usr/share contains a lot of informative stuff that can be deleted.
Basically, you can delete anything as long is you do not use it.
However, when you start deleting files belonging to packages you can
break the dependencies and thus make it hard to keep up to date with the
latest updates.
-CC
Post by Jianping Zhu
I have a redhat 7.1 linux server. I am running out space of the filesystem
/usr.
Unless you have /usr mounted as a partition, it is ust a directory on the root filesystem
Post by Rhugga
I need some 20 M space because my boss need to put some files there
Post by Jianping Zhu
imediately. I know it very risk to delete files from there.
Here is the result by using df -s /usr/*
-----------------------
79052 /usr/X11R6
92108 /usr/bin
4 /usr/dict
4 /usr/etc
40 /usr/games
21584 /usr/include
4232 /usr/kerberos
323496 /usr/lib
2288 /usr/libexec
420 /usr/local
68 /usr/man
11444 /usr/sbin
676820 /usr/share
118776 /usr/src
0 /usr/tmp
----------------------
I thought may /usr/games is not essentail. Can delete it? what directory
else can I potentially delete?
Thanks in Advance!
--------------------------------
Jianping Zhu
Department of Computer Science
Univerity of Georgia
Athens, GA 30602
Tel 706 5423900
-------------------------------
Disk space is disk space. You can delete files anywhere, but to keep from "breaking" things, tred carefully.
I would uninstall RPMS, (utilities, games, services, etc.) that I don't use or need. X Windows managers and graphics packages use up a lot of disk space.
Use df -m to show how much free space you have in mb.


Regards,

Tom
Will Francis
2002-04-10 19:10:02 UTC
Permalink
Post by Jianping Zhu
I need some 20 M space because my boss need to put some files there
imediately. I know it very risk to delete files from there.
Here is the result by using df -s /usr/*
I think a better solution (that I've used many times) is to find a
partition that has space left on it and put all your files there and symlink
it back to /usr. Like, if you /var partition has a lot of space mkdir
/var/stuff, copy all the stuff you already have into there and then ln -s
that back to /usr/stuff. It's vaguely ugly, but you don't need to worry about
what you are deleting then.

If that solution doesn't work for you, I'd suggest using rpm -e wherever
you can to remove whole packages cleanly rather than deleting some of the
files out from under it (unless it's just documentation from /usr/share/)

Will

Continue reading on narkive:
Loading...