Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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).

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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.)

share|improve this answer
    
Ubuntu uses upstart, not some form of SysV init. –  JanC Nov 8 '10 at 1:17
2  
@JanC: The question specified lucid, and cups is started by a SysV-style script in lucid. (I did check before answering!) –  Gilles Nov 8 '10 at 1:20
    
All three answers were educational but this one spoke most clearly about the effects of the absence of a meta-package. Thanks all. –  msw Nov 8 '10 at 1:37
    
You are right about Lucid, seems like the CUPS script wasn't ported to upstart yet. –  JanC Nov 8 '10 at 1:38

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.

share|improve this answer

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.

share|improve this answer
    
@htorque: the advantage of just making it not start automatically is that you can still start it manually with no hassle. –  Gilles Nov 8 '10 at 1:21
    
@htorque: you lose the option to run CUPS manually then, and I'm also not sure if a package upgrade could put the original cups.conf back if it doesn't find anything with that name. –  JanC Nov 8 '10 at 1:22
    
Yeah, feeling stupid now after carefully reading the last part of the answer - sorry! :-) –  htorque Nov 8 '10 at 1:27
    
I was editing my own answer while you commented... ;) –  JanC Nov 8 '10 at 1:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.