Kill gnomes completely
Sidenote: recovered from the Wayback Machine; original URL for this post was http://zombie-storage.com/?p=52
If you are like me and occasionally too lazy to do something right the first time you may have installed a GUI desktop on a headless server before. That’s what I’ve done on this very server. It is a tiny box running off two 8GB CF cards in one of the cheapest SSD setups in existence. The box has a fan and it’s been spinning up lately because of random GUI processes from Ubuntu. My solution is to use a hammer and delete everything associated with the GUI and desktop.
These instructions were tailored for Ubuntu 11.10 (Oneiric Ocelot) on a 64 bit system. Feel free to spread them about. Remember that removing this many packages carries risks, desktop mode will be removed, GUI libraries are removed and your other applications may stop working. This is a silver bullet, it shoots every graphical package in the face at once.
Use at your own risk and test it first before running it on a production system or your only computer.
Here is the magic command:
sudo apt-get remove aisleriot alacarte app-install-data-partner apport-gtk \
aptdaemon at-spi binfmt-support brasero brltty-x11 capplets-data checkbox \
checkbox-gtk cli-common compiz compiz-core compiz-fusion-plugins-extra \
compiz-fusion-plugins-main compiz-gnome compiz-plugins compiz-wrapper \
compizconfig-backend-gconf computer-janitor computer-janitor-gtk couchdb-bin \
dcraw desktop-file-utils desktopcouch devicekit-power dmz-cursor-theme doc-base \
docbook-xml empathy empathy-doc eog erlang-base erlang-crypto erlang-inets \
erlang-mnesia erlang-public-key erlang-runtime-tools erlang-ssl \
erlang-syntax-tools erlang-xmerl esound-clients esound-common espeak \
espeak-data evince evolution evolution-common evolution-couchdb \
evolution-data-server evolution-data-server-common evolution-documentation-en \
evolution-exchange evolution-indicator evolution-plugins evolution-webcal \
example-content f-spot file-roller firefox firefox-gnome-support gamin \
gcalctool gconf-defaults-service gconf-editor gconf2 gconf2-common gdebi \
gdm gdm-guest-session gedit gedit-common ggzcore-bin gimp gimp-data gksu \
glchess glines gnect gnibbles gnobots2 gnome-about gnome-accessibility-themes \
gnome-applets gnome-applets-data gnome-bluetooth gnome-codec-install \
gnome-control-center gnome-desktop-data gnome-disk-utility gnome-doc-utils \
gnome-games gnome-games-common gnome-icon-theme gnome-keyring gnome-mag \
gnome-mahjongg gnome-media gnome-media-common gnome-menus gnome-mime-data \
gnome-nettool gnome-orca gnome-panel gnome-panel-data gnome-pilot \
gnome-pilot-conduits gnome-power-manager gnome-screensaver gnome-session \
gnome-session-bin gnome-session-canberra gnome-settings-daemon gnome-sudoku \
gnome-system-monitor gnome-system-tools gnome-terminal gnome-terminal-data \
gnome-themes-selected gnome-themes-ubuntu gnome-user-guide gnome-utils \
gnometris gnomine gnotravex gnotski gstreamer0.10-alsa gstreamer0.10-nice \
gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps \
gstreamer0.10-plugins-good gstreamer0.10-pulseaudio gstreamer0.10-tools \
gstreamer0.10-x gtali gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf \
gucharmap guile-1.8-libs gvfs gvfs-backends gvfs-bin gvfs-fuse human-theme \
humanity-icon-theme iagno ibus ibus-gtk ibus-m17n ibus-table indicator-applet \
indicator-applet-session indicator-messages indicator-session jockey-gtk \
language-selector launchpad-integration libanthy0 libart-2.0-2 libart2.0-cil \
libasound2-plugins libatspi1.0-0 libaudiofile0 libavahi-glib1 libavahi-gobject0 \
libavahi-ui0 libavc1394-0 libbabl-0.0-0 libbonobo2-0 libbonobo2-common \
libbonoboui2-0 libbonoboui2-common libcairo-perl libcairomm-1.0-1 libcamel1.2-14 \
libcanberra-gtk-module libcanberra-gtk0 libcanberra-pulse libcanberra0 libcdio-cdda0 \
libcdio-paranoia0 libclutter-1.0-0 libclutter-gtk-0.10-0 libcompizconfig0 \
libcouchdb-glib-1.0-1 libcroco3 libcryptui0 libcurl3 libdbusmenu-glib0 libdecoration0 \
libdotconf1.0 libdv4 libebackend1.2-0 libebook1.2-9 libecal1.2-7 libedata-book1.2-2 \
libedataserverui1.2-8 libegroupwise1.2-13 libempathy-common libempathy-gtk-common \
libesd-alsa0 libespeak1 libevent-1.4-2 libexempi3 libflickrnet2.2-cil \
libfreezethaw-perl libgail-common libgail-gnome-module libgail18 libgamin0 \
libgconf2-4 libgconf2.0-cil libgcr0 libgd2-xpm libgdata-common \
libgdata-google1.2-1 libgdict-1.0-6 libgdiplus libgdu-gtk0 libgdu0 libgegl-0.0-0 \
libggz2 libggzcore9 libggzmod4 libgimp2.0 libgksu2-0 libglade2-0 libglade2.0-cil \
libglib-perl libglib2.0-cil libglibmm-2.4-1c2a libgmime-2.0-2a libgmime-2.4-2 \
libgmime2.2a-cil libgnome-keyring0 libgnome-keyring1.0-cil libgnome-mag2 \
libgnome-media0 libgnome-menu2 libgnome-pilot2 libgnome-vfs2.0-cil \
libgnome-window-settings1 libgnome2-0 libgnome2-canvas-perl libgnome2-common \
libgnome2-perl libgnome2-vfs-perl libgnome2.24-cil libgnomecanvas2-0 \
libgnomecanvas2-common libgnomekbd-common libgnomekbd4 libgnomepanel2.24-cil \
libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common \
libgnomevfs2-extra libgp11-0 libgsf-1-114 libgsf-1-common libgstfarsight0.10-0 \
libgtk-vnc-1.0-0 libgtk2-perl libgtk2.0-cil libgtkhtml-editor-common \
libgtkhtml-editor0 libgtkhtml3.14-19 libgtkmm-2.4-1c2a libgtksourceview2.0-0 \
libgtksourceview2.0-common libgtkspell0 libgtop2-7 libgtop2-common libgucharmap7 \
libgvfscommon0 libgweather-common libgweather1 libidl0 libiec61883-0 \
libjson-glib-1.0-0 liblaunchpad-integration1 liblircclient0 liblouis-data \
liblpint-bonobo0 libm17n-0 libmetacity0 libmldbm-perl libmono-addins-gui0.2-cil \
libmono-addins0.2-cil libmono-cairo2.0-cil libmono-corlib2.0-cil \
libmono-data-tds2.0-cil libmono-i18n-west2.0-cil libmono-posix2.0-cil \
libmono-security2.0-cil libmono-sharpzip2.84-cil libmono-sqlite2.0-cil \
libmono-system-data2.0-cil libmono-system-web2.0-cil libmono-system2.0-cil \
libmono2.0-cil libnautilus-extension1 libndesk-dbus-glib1.0-cil \
libndesk-dbus1.0-cil libnet-dbus-perl libnice0 libnotify1 liboil0.3 liboobs-1-4 \
liborbit2 libotf0 libpam-gnome-keyring libpanel-applet2-0 libpango-perl \
libpangomm-1.4-1 libpisock9 libpisync1 libpolkit-agent-1-0 libpolkit-gtk-1-0 \
libportaudio2 libproxy0 libpst4 libpulse-browse0 libpulse-mainloop-glib0 \
libpurple-bin libpurple0 librarian0 libraw1394-11 librsvg2-2 librsvg2-common \
libsctp1 libsexy2 libshout3 libsilc-1.1-2 libsilcclient-1.1-3 libsoup-gnome2.4-1 \
libsoup2.4-1 libspeechd2 libspeexdsp1 libsqlite0 libstartup-notification0 \
libtdb1 libtelepathy-farsight0 libtelepathy-glib0 libtie-ixhash-perl \
libtotem-plparser12 libunique-1.0-0 libuuid-perl libvisual-0.4-0 \
libvisual-0.4-plugins libvte-common libvte9 libwebkit-1.0-2 \
libwebkit-1.0-common libwmf0.2-7-gtk libwnck-common libwnck22 libxcb-atom1 \
libxcb-aux0 libxcb-event1 libxml-twig-perl libxml-xpath-perl libxres1 \
libzephyr4 lksctp-tools m17n-contrib m17n-db media-player-info mesa-utils \
metacity metacity-common mobile-broadband-provider-info mono-2.0-gac \
mono-gac mono-runtime mousetweaks nautilus nautilus-data nautilus-sendto \
nautilus-share network-manager-gnome notification-daemon notify-osd \
notify-osd-icons obexd-client onboard openoffice.org-gnome \
openoffice.org-gtk openoffice.org-help-en-us pkg-config policykit-1-gnome \
protobuf-compiler pulseaudio pulseaudio-esound-compat \
pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-udev \
pulseaudio-module-x11 pulseaudio-utils python-aptdaemon python-aptdaemon-gtk \
python-avahi python-brlapi python-cairo python-configglue python-couchdb \
python-crypto python-desktopcouch python-desktopcouch-records python-fstab \
python-gconf python-glade2 python-gmenu python-gnome2 python-gnomeapplet \
python-gnomecanvas python-gnomekeyring python-gst0.10 python-gtk2 \
python-gtksourceview2 python-ibus python-launchpad-integration python-libxml2 \
python-louis python-notify python-openssl python-pam python-papyon \
python-protobuf python-pyatspi python-pyinotify python-pyorbit python-rdflib \
python-rsvg python-serial python-sexy python-speechd python-telepathy \
python-twisted-bin python-twisted-core python-twisted-names python-twisted-web \
python-ubuntuone-client python-ubuntuone-storageprotocol python-virtkey \
python-vte python-webkit rarian-compat rhythmbox same-gnome \
screen-resolution-extra screensaver-default-images seahorse sgml-data \
software-center software-properties-gtk speech-dispatcher ssh-askpass-gnome \
synaptic system-config-printer-gnome system-tools-backends telepathy-butterfly \
telepathy-gabble telepathy-haze telepathy-idle telepathy-mission-control-5 \
telepathy-salut tomboy totem totem-common totem-mozilla totem-plugins \
transmission-common transmission-gtk tsclient ubufox ubuntu-artwork \
ubuntu-desktop ubuntu-docs ubuntu-sounds ubuntu-system-service \
ubuntu-wallpapers ubuntu-xsplash-artwork ubuntuone-client \
ubuntuone-client-gnome update-manager update-notifier usb-creator-gtk vinagre \
vino whois xdg-user-dirs-gtk xsane xsane-common xscreensaver \
xscreensaver-data xscreensaver-gl xsltproc xsplash xulrunner-1.9.1 yelp zenity
Good luck. It turned my standard Ubuntu Desktop install into a lightweight, headless, minimal install in about 20 minutes. 700MB freed and now using 50% less RAM.