Recommended way to disable a service in Debian

Solution 1:

Have a look at the update-rc.d man page. The third paragraph of the section named Installing Init Script Links reads …

A common system administration error is to delete the links with the thought that this will "disable" the service, i.e., that this will prevent the service from being started. However, if all links have been deleted then the next time the package is upgraded, the package's postinst script will run update-rc.d again and this will reinstall links at their factory default locations. The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service's symbolic links from S to K.

The last two sentences should answer your question. :-)

Solution 2:

You can try "sysv-rc-conf" utility to make your life little easier. It is more of chkconfig tool of other system.

Just type at the promp:

sudo apt-get install sysv-rc-conf

Cheers!

Solution 3:

Actually, sysv-rc-conf is the approach recommended even by update-rc.d man page:

Please note that this program was designed for use in package maintainer scripts and, accordingly, has only the very limited functionality required by such scripts. System administrators are not encouraged to use update-rc.d to manage runlevels. They should edit the links directly or use runlevel editors such as sysv-rc-conf and bum instead.