CentOS 4 Disk Space

I really don't see any need to have Xorg installed and would like to get rid of it. Just want to see what people suggest.

rpm -e xorg-x11 complains about dependencies with xinitrd so should I just force remove xorg?

Any other packages that I really don't need?

Thanks

2 Replies

No no no don't ever force remove an rpm. –force should be a hidden option. You'll break your system's internal consistency, and the next time X is updated yum will try and fix it again by reinstalling it all.

I presume you meant xinitrc anyway. It's part of X, so if you want to remove X, you'll want to remove it too. There's a whole lot more rpms than xorg-x11: try:

% rpm -qa 'xorg'

for instance.

Yum will help you remove packages and packages that depend on it, if you really want to do this. E.g.:

% yum remove rpm -qa '*xorg*'

and see what else it wants to remove. I bet the answer's "nearly everything".

If your aim is to remove the biggest packages that you don't need, you may be better starting by listing installed rpms by size:

% rpm -qa --queryformat "%{size} %{name}\n" | sort -nr

  • delete the biggest ones you don't want as described above. Bet ImageMagick is one of them. Watch out for anything yum wants to uninstall too. If it wants to remove something you want to keep, it knows best - don't use --force. Dependencies are good for you.

Actually, I'm quite disturbed having run this myself on my linode. It's of course faultless on other Centos systems, but my linode rpm db seems to be full of duplicate versions of packages, meaning rpmdb thinks older versions are installed when they're not. Example:

rpm -q httpd-suexec

httpd-suexec-2.0.52-12.2.ent.centos4

httpd-suexec-2.0.52-9.ent.centos4.1

rpm -ql httpd-suexec

/usr/sbin/suexec

/usr/share/man/man8/suexec.8.gz

/usr/sbin/suexec

/usr/share/man/man8/suexec.8.gz

rpm -qV httpd-suexec-2.0.52-12.2.ent.centos4

rpm -qV httpd-suexec-2.0.52-9.ent.centos4.1

..5….T /usr/sbin/suexec

  • in other words, version 2.0.52-9.ent.centos4.1 isn't really installed, and version 2.0.52-12.2.ent.centos4 is, but rpmdb didn't remove the old rpm placeholder from its database. I presume this applies to packages updated since Linode's install image by yum myself, and /var/log/yum.log seems to confirm this. It's quite scary seeing two glibc's installed.

Is this a "feature" of the Linode rollout system, or a yum/rpmdb bug? I don't see the problem on any of my other CentOS systems. Do others see it here on CentOS 4?

P.S. rpm --rebuilddb doesn't fix it, no. Nor are there any lock files /var/lib/rpm/__db* around.

P.P.S this fixes it. But I'm certainly not going to do this to glibc until I know why it happened…

rpm -e --justdb httpd-suexec-2.0.52-9.ent.centos4.1

rpm -qV httpd-suexec-2.0.52-9.ent.centos4.1

package httpd-suexec-2.0.52-9.ent.centos4.1 is not installed

rpm -qV httpd-suexec-2.0.52-12.2.ent.centos4

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct