rpm packages not necessary for a web server

Below is a list of rpm packages that are not necessary on a web server. Use it as a reference starting point for cleaning up servers. You may also want to make sure not to run services not required by the server.
NOTE: usage may vary and removal should be in the order listed:

  1. redhat-lsb cups system-config-printer-libs system-config-printer paps -- printer support

  2. system-config-soundcard  -- gui for sound setup

  3. system-config-securitylevel-tui -- gui for setting up security

  4. nfs-utils system-config-nfs nfs-utils-lib -- nfs server

  5. portmap -- manage RPC connections
  6. ypbind yp-tools -- NIS client binding
  7. htmlview  -- view webpages via gui

  8. system-config-services system-config-samba pinfo system-config-users system-config-date -- gui configs

  9. samba samba-client samba-common -- samba support

  10. oprofile oprofile-devel oprofile-gui qt
  11. vnc
  12. libglade2 libgnomecanvas usermode-gtk libbonoboui libgnomeui libglade-java pygtk2-libglade system-config-httpd system-config-network gnome-mount libgnome-java gnome-python2-bonobo gnome-python2-canvas gnome-python2 authconfig-gtk system-config-lvm authconfig-gtk pirut gnome-vfs2 gnome-python2-gnomevfs gnome-python2-gconf libgnome libgsf librsvg2 librsvg2
    ImageMagick
  13. gnome-mime-data gnome-keyring  notify-python

  14. GConf2 notification-daemon bluez-gnome libgconf-java libnotify bluez-utils
  15. libgtk-java libvte-java
  16. pygtk2 system-config-language system-config-rootpassword
  17. vte
  18. libwnck
  19. glib-java cairo-java frysk
  20. libwmf
  21. gtk2
  22. cups-libs

  23. ghostscript ghostscript-fonts

  24. avahi avahi-glib
  25. wpa_supplicant NetworkManager
  26. system-config-rootpassword
  27. system-config-language

  28. system-config-keyboard
  29. system-config-network-tui firstboot-tui
  30. system-config-securitylevel-tui
  31. dhcpv6_client dhcdbd dhclient -- dhcp support

  32. irda-utils -- Infra Red communications
  33. isdn4k-utils -- ISDN
  34. apmd -- laptop power management
  35. cpuspeed -- dynamically changing cpu speed
  36. bluez-libs -- bluetooth
  37. irqbalance -- irq load balancing on multi-cpus (remove only in single cpu situation)
  38. rsh -- unsecure remote access
  39. talk -- internet talk protocol
  40. foomatic -- printer driver database
  41. finger -- finger client
  42. eject -- eject removable media
  43. cvs -- concurrent version control

  44. rcs -- revision control system
  45. dosfstools mkbootdisk -- bootdisk
  46. redhat-menus desktop-file-utils startup-notification -- desktop
  47. ppp rp-pppoe wvdial -- dialup
  48. esound -- sound daemon
  49. pcmciautils -- PCMCIA Cardbus
  50. pcsc-lite coolkey ifd-egate ccid
  51. OpenIPMI net-snmp-libs
  52. ImageMagick-devel -- ImageMagick development package
  53. xorg-x11-devel -- X server development package
  54. acpid -- power management (remove if you don't shutdown using power button)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

yum groupremove

Remove all X packages at once:

yum -y groupremove "X Window System"

additional packages

Using yum gets rid of dependent packages automatically.

yum remove ORBit2 alsa-lib redhat-lsb cups yp-tools nfs-utils nfs-utils-lib ypbind portmap avahi avahi-compat-libdns_sd ifd-egate ccid pcsc-lite pcsc-lite-libs rhpl coolkey bluez-utils bluez-gnome bluez-libs NetworkManager-glib wpa_supplicant NetworkManager ecryptfs-utils trousers nss_ldap nscd krb5-workstation irda-utils gpm dnsmasq cpuspeed pinfo htmlview redhat-menus desktop-file-utils system-config-network-tui firstboot-tui wireless-tools system-config-securitylevel-tui dhcpv6-client xorg-x11-filesystem pcmciautils notification-daemon libnotify libwnck startup-notification busybox kexec-tools elinks pango rsh sos

shell script to remove the above mentioned rpms + some

I've taken the above text and modified it to a shell script.

#!/bin/bash
# cleanup_rpms.sh
rpm -e  redhat-lsb cups system-config-printer-libs system-config-printer paps # printer support
rpm -e system-config-soundcard  # gui for sound setup
rpm -e system-config-securitylevel system-config-securitylevel-tui # gui for setting up security
rpm -e nfs-utils nfs-utils-lib system-config-nfs nfs-utils-lib # nfs server
rpm -e portmap # manage RPC connections
rpm -e ypbind yp-tools # NIS client binding
rpm -e pinfo system-config-services htmlview system-config-date system-logviewer system-config-users # view webpages via gui
rpm -e system-config-services system-config-samba pinfo system-config-users system-config-date # gui configs
rpm -e samba samba-client samba-common # samba support
rpm -e oprofile oprofile-devel oprofile-gui qt
rpm -e vnc
rpm -e system-config-httpd system-config-netboot system-config-lvm system-config-network system-config-packages # gui configs
rpm -e system-switch-im authconfig-gtk
rpm -e gnome-python2 gnome-python2-bonobo  libgnomeui libbonoboui libgnomecanvas  gnome-vfs2 # gnome
rpm -e bluez-pin usermode-gtk libglade2 bluez-hcidump bluez-bluefw # bluetooth
rpm -e usermode-gtk libglade-java pygtk2-libglade system-config-httpd system-config-network
rpm -e gnome-mount libgnome-java gnome-python2-canvas authconfig-gtk system-config-lvm
rpm -e authconfig-gtk pirut gnome-python2-gnomevfs gnome-python2-gconf libgnome libgsf
rpm -e librsvg2 librsvg2 ImageMagick
rpm -e gnome-mime-data gnome-keyring  notify-python
rpm -e GConf2 notification-daemon bluez-gnome libgconf-java libnotify bluez-utils
rpm -e java-1.4.2-gcj-compat gcc-java libgcj-devel libgcj
rpm -e libgtk-java libvte-java
rpm -e pygtk2 system-config-language system-config-rootpassword
rpm -e iiimf-csconv iiimf-libs iiimf-server iiimf-docs iiimf-le-xcin iiimf-le-unit
rpm -e iiimf-le-hangul iiimf-le-chinput iiimf-le-canna Canna Canna-libs
rpm -e vte
rpm -e libwnck
rpm -e glib-java cairo-java frysk
rpm -e libwmf
rpm -e gtk2
rpm -e cups-libs
rpm -e ghostscript ghostscript-fonts
rpm -e avahi avahi-glib
rpm -e wpa_supplicant NetworkManager
rpm -e system-config-rootpassword
rpm -e system-config-language
rpm -e system-config-keyboard
rpm -e system-config-network-tui firstboot-tui
rpm -e system-config-securitylevel-tui
rpm -e dhcpv6_client dhcdbd dhclient # dhcp support
rpm -e irda-utils # Infra Red communications
rpm -e isdn4k-utils # ISDN
rpm -e apmd # laptop power management
rpm -e cpuspeed # dynamically changing cpu speed
rpm -e bluez-libs # bluetooth
# rpm -e irqbalance # irq load balancing on multi-cpus
rpm -e rsh # unsecure remote access
rpm -e talk # internet talk protocol
rpm -e foomatic # printer driver database
rpm -e finger # finger client
rpm -e eject # eject removable media
rpm -e cvs # concurrent version control
rpm -e rcs # revision control system
rpm -e dosfstools mkbootdisk # bootdisk
rpm -e redhat-menus desktop-file-utils startup-notification # desktop
rpm -e ppp rp-pppoe wvdial # dialup
rpm -e esound # sound daemon
rpm -e pcmcia-cs pcmciautils # PCMCIA Cardbus
rpm -e pcsc-lite coolkey ifd-egate ccid
rpm -e OpenIPMI net-snmp-libs
rpm -e ImageMagick-devel # ImageMagick development package
rpm -e xorg-x11-devel # X server development package
# rpm -e acpid # power management
rpm -e squid # proxy / cache
rpm -e emacs emacs-leim emacs-common # editor
rpm -e tux vsftpd
rpm -e netdump
rpm -e taipeifonts fonts-arabic fonts-hebrew fonts-bengali kon2-fonts
rpm -e sox
rpm -e jpackage-utils
rpm -e NetworkManager
rpm -e nscd nss_ldap python-ldap openldap-clients openldap-devel
rpm -e distcache
rpm -e xorg-x11-xfs chkfontpath
rpm -e tk catdoc

Comment