I’ve recently installed Ubuntu 12.04 Long Term Support (LTS). The main advantage of a LTS distribution is that once you clean it up, it stays like that for two years.
First step is to switch your desktop to LXDE, unless you like Unity or Gnome the Third. The recommended way is to install Lubuntu, in my case I will install LXDE on top of regular Unity. If you already have regular Ubuntu installed, it would be too much trouble to start downloading and installing everything. Also keep in mind that Lubuntu is not a LTS release, and the applications installed are different, for example Goolge Chromium instead of Mozilla Firefox, or Gnumeric instead of LibreOffice Calc. LXDE is such a small desktop component, it might be a better idea to chose your distro based on the applications it provides and switch the default desktop environment to LXDE.
$ sudo apt-get install lxde
Logout and login again, this time in a LXDE session and start cleaning up all the processes that don’t make sense. Here are some of them:
Avahi is a zeroconf implementation and a system for multicast DNS/DNS-SD service discovery. Its job is to assign an IP address on an interface (RFC 3927) if a DHCP server is not present on the network, or if a static address was not configured. It allows you to plug your laptop or computer into a network and instantly be able to view other people who you can chat with, find printers to print to or find files being shared. Right… the only reason I start my computer every day is to find files being shared on my local network!
The only way to disable avahi is to modify several configuration files in /etc directory as follows:
/etc/init/avahi-daemon.conf – add the word never below:
start on (never and filesystem and started dbus) stop on stopping dbus
/etc/network/if-up.d/avahi-autoipd – add an exit 0 as soon as the script starts
#!/bin/sh exit 0
/etc/network/if-up.d/avahi-daemon – add an exit 0 as soon as the script starts
#!/bin/sh exit 0
Zeitgeist is a service which logs the users’s activities and events, anywhere from files opened to websites visited and conversations – for sure is not needed on my computer. However, they say Gnome3 and Unity cannot function without it – piece of garbage if you are to ask me!
Start by disabling the access to the database:
$ chmod -rw ~/.local/share/zeitgeist/activity.sqlite
Restart zeitgeist, it should fail miserably:
$ zeitgeist-daemon —-replace
[21:15:40.425853 WARNING] Could not access the database file.
Please check the permissions of file /home/user/.local/share/zeitgeist/activity.sqlite.
Purge all zeitgeist packages from the system:
$ dpkg -l |grep zeit
ii libzeitgeist-1.0-1 0.3.18-1ubuntu1 library to access Zeitgeist – shared library
ii python-zeitgeist 0.9.0-1ubuntu1 event logging framework – Python bindings
ii rhythmbox-plugin-zeitgeist 2.96-0ubuntu4.2 zeitgeist plugin for rhythmbox music player
ii zeitgeist 0.9.0-1ubuntu1 event logging framework
ii zeitgeist-core 0.9.0-1ubuntu1 event logging framework – engine
ii zeitgeist-datahub 0.8.2-1ubuntu2 event logging framework – passive logging daemon
$ sudo apt-get purge libzeitgeist-1.0-1 python-zeitgeist rhythmbox-plugin-zeitgeist zeitgeist zeitgeist-core zeitgeist-datahub
Ubuntu One is a file syncing service similar to Dropbox. It takes a lot of RAM memory and generates a lot of traffic on the network. Even if you didn’t sign up for the service, the thing is still loaded and running. Get rid of it if you don’t really need it.
Do a dpkg -l | grep ubuntuone and purge all ubuntuone packages from the system.
$ sudo apt-get purge gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1 python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol rhythmbox-ubuntuone ubuntuone-client ubuntuone-client-gnome ubuntuone-control-panel ubuntuone-couch ubuntuone-installer
Also, remove the storage in the local directory:
$ rm -fr ~/.local/share/ubuntuone ~/.config/ubuntuone ~/.cache/ubuntuone/
Like all the other processes discussed here, ubuntuone-syncd will be gone after the next reboot.
This is Ubuntu error reporting daemon. It also takes a lot of RAM memory, and occasionally crashes trying to send reports to Canonical.
$ sudo apt-get purge whoopsie
The good old UNIX printing service – if you are not using a printer, just remove it.
$ sudo apt-get purge cups
Probably my desktop weights more than 20lb, not to mention the monitor, the desk and the chair. It is not a mobile station, why should I run modem-manager? If there is a remote use case for something, you can depend on Canonical to enable it by default.
$ sudo apt-get purge modemmanager
Looking through my process list with ps aux I run into bluetoothd. Unfortunately I don’t have one of those wireless keyboards/mouse and I don’t really care about synchronizing portables, so off it goes:
$ sudo apt-get purge gnome-bluetooth
You also need to edit /etc/modprobe.d/blacklist.conf and add a blacklist bluetooth at the end of the file
blacklist amd76x_edac blacklist bluetooth
colord is a system daemon that manages device color profiles, whatever that is… I mean it was… Just to help you make up your mind regarding removing colord, this is what the urban dictionary has to say about “I mean”:
Meaningless American use of the English language. Often reflective of a complete lack of content in what they are saying – people of average intellect, articulation and education will simply pause and think about what they are saying. Probably due to American television with programs such as “Clueless”, “Legally Blonde” and “the OC”, which depict successful people as not requiring any form of intelligence or decent command of the English language. In real life, these people look stupid, act stupid, and everyone thinks they are stupid. Typically, they fail intelligence tests.
You’ve been warned!
$ sudo apt-get purge colord
Déjà Dup is a very powerful backup tool included with Ubuntu. All things powerful consume memory and lots of CPU cycles. If you are like me and never do a backup, you can lose it.
$ sudo apt-get purge deja-dup
getty process runs on text-mode consoles and waits for someone to log in. It then configures the tty device and spawns a login shell. In my Ubuntu box there are 6 of them waiting for a login that will never happen – as I said earlier, I am running LXDE. I would keep however two of them, just in case…
getty is controlled by tty*.conf files in /etc/init directory. Keep tty1.conf and tty2.conf in /etc/init and move tty3.conf, tty4.conf, tty5.conf and tty6.conf in some safe place outside /etc directory. In case you ever need them, you just move them back.
You definitely don’t need this. It will bug you daily to update your software while holding a lot of memory hostage and doing absolutely nothing. What’s next, a do-your-homework-notifier?
$ sudo apt-get purge update-notifier
You are the boss, so you do updates manually whenever you feel like it.
sudo apt-get update && sudo apt-get upgrade.
acpid deals with such events as closing a notebook lid, removing power supplies, phone jacks etc. It doesn’t make sense to run it on a desktop.
$ sudo apt-get purge acpid
This is an ongoing security nightmare, this is how you get rid of it:
$ sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Another useless piece of functionality. You can find more about it here and here. The bug was opened a few years ago in Lubuntu, and it is still waiting for the “big guns” to decide what to do about it. Until they fix it, if they ever do, just
$ sudo apt-get purge apt-xapian-index
After years of running Gentoo and Fedora, switching to Ubuntu is shocking. The desktop is cluttered with Canonical branding and marketing software, it is comparably slower, and some people say it lacks privacy. It doesn’t have to be this way, you can always remove the annoying Canonical bits starting with Unity.
On my desktop – 64bit AMD dual core – once everything was removed, free command is reporting 159MB memory in use after startup. I can probably get 15MB less if I scrap NetworkManager and just start dhclient manually from /etc/rc.local.
The surprise is that a similarly pruned Fedora 17 system was starting at 210MB, quite a lot compared to Ubuntu. I would definitely recommend Ubuntu over Fedora any time. The only problem is that you have to clean it a little, as every existing obscure open-source functionality is started by default.