I've got a pure vanilla Lucid Desktop installation on a severely RAM limited laptop (with a slow drive for extra happy swapping).

I'm trying to remove packages that snuck in on ubuntu-desktop which I know I'll never use. For example

apt-get remove --simulate '.*openoffice.*' 

worked without a problem, but didn't save me any RAM, either. So I've looked to the things that are actually running, and as the box doesn't have bluetooth,

apt-get remove --simulate  gnome-bluetooth

seemed reasonable but took package gnome-user-share along with it. But that's okay. However, if I don't want printing capabilities,

apt-get remove --simulate cups

wants to take out ubuntu-desktop which is a metapackage which depends on literally 100 essential sub-systems (e.g. nautilus and gnome-panel among others). Of course, removing cups won't cause the removal of nautilus, but it does seem like it will leave my apt package state confused.

Am I missing some deep Ubuntu mystique or would removing cups be bad? (I put the --simulate flag in my examples lest someone cut-paste-cry).


Removing cups or ubuntu-desktop won't leave your package state confused. Only --force-… can do that.

ubuntu-desktop roughly means “all the basic functionality an Ubuntu user on the desktop should have without having to look for it”. Printing is included in that. If you don't want printing, you're sacrificing functionality. You can still remove ubuntu-desktop, but then it's up to you to make sure you know which of its dependencies you must keep.

If you're only limited in RAM and not in disk space, you don't have to remove CUPS, you can just not start it. Under lucid, rename /etc/rc2.d/S50cups to /etc/rc2.d/K50cups, and similarly in rc3.d, rc4.d and rc5.d.

But you're not going to gain much by not running CUPS; it would start, and quickly get into the swap and never come back as long as you don't print, and it's less than 2MB anyway. If you're RAM-starved, the best you can do is really to ditch Gnome (I see nautilus at 30MB, gnome-panel at 13MB, nm-applet at 11MB... Some of this is shared, but compared with the Gnome stuff, the system daemons are peanuts.)


Since you are not looking after free disk space, but rather free RAM (memory) you can work around by not launching those applications in the first place :). Use gnome-session-properties an un-check any service that is not needed by your session.

If for example you will need to print something at a later time, you can start cups only for that session.


Removing ubuntu-desktop is not going to break your machine if you are careful enough; I have done so myself when I wanted to use an alternative to a package supplied by ubuntu-desktop by default. The only thing missing after doing so is the "warning" that you are removing something that is part of a default Ubuntu desktop.

But if your main issue is RAM and not disk space, it's also possible to make sure the programs you don't need just don't run.


The following works for Maverick (10.10) but not for Lucid. See Gilles' answer for Lucid (and older Ubuntu versions).

In case of cups you can edit /etc/init/cups.conf and comment out the start on ... line like this:

#start on (filesystem
#          and (started dbus or runlevel [2345])
#          and stopped udevtrigger)

That will prevent CUPS from starting automatically (but you can still start it manually with sudo start cups).


For applications that run inside a user session, those can be disabled in System --> Preferences --> Startup Applications.