Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i prevent newly installed packages from creating links in e.g /etc/rc2.d? Currently i'm launching update-rc.d -f blabla remove /etc/rc.local each time during boot.

But this shouldn't be necessary.

I need this because i have some packages , like samba server , no need to start everytime , just start whenever i need it is fine for me.

share|improve this question
up vote 2 down vote accepted

Instead of removing the links, disable them. The difference is that removal does not make dpkg aware of your preference to prevent the startup scripts from being executed because dpkg runs update-rc.d too for removing and adding the links.

To disable a service:

sudo update-rc.d blabla disable

You should not have a need for removing /etc/rc.local as it's usually not modified by package management scripts.

share|improve this answer

Your Answer


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.