30

I installed an init.d script with this command:

sudo update-rc.d mongodb defaults 98 02

I want to uninstall it, so I'm planning on running:

sudo update-rc.d -f mongodb remove

I'm concerned about the start and stop conditions in the installation command.
Will running the remove cause the start and stop conditions to be removed also?

Are there any implications that I should be aware of?

1 Answer 1

23

Will running the remove cause the start and stop conditions to be removed also?

It will remove any instance of your script from the system, meaning, any link in /etc/rc*runlevel*.d to the mongodb script in your /etc/init.d.

Are there any implications that I should be aware of?

If some other script depends of mongodb to start/stop it will fail.

Check the manpage for a complete description.

2
  • 1
    Hello, I realise it is a bit late to respond to this answer, but I wonder why help.ubuntu.com/community/UbuntuBootupHowto says on deactivating init scripts: 'Do not use the update-rc.d command for this purpose! It is only used in package installation scripts, and not designed for this kind of runlevel management.'What the problems with using it like that? Aug 5, 2014 at 17:47
  • @user2520938 because they are saying that one should use upstart management instead, but in this case, the user installed a script using sysvinit helpers, so it has to use the sysvinit to remove it.
    – Braiam
    Sep 3, 2014 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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