If you have a service that starts on boot that you wish not to start on boot then you can remove it pretty easily. Unfortunately, uninstalling the app or removing the /etc/init.d/*app* file won't do the trick. There is a command called 'update-rc.d' that is very handy. As an example I will use 'sendmail' that I no longer want to start on boot. Below is a very simple code to accomplish this:
sudo update-rc.d -f sendmail remove
You should see an output similar to this:
Removing any system startup links for /etc/init.d/sendmail ... /etc/rc0.d/K19sendmail /etc/rc1.d/K19sendmail /etc/rc2.d/S21sendmail /etc/rc3.d/S21sendmail /etc/rc4.d/S21sendmail /etc/rc5.d/S21sendmail /etc/rc6.d/K19sendmail
Now when you reboot your system the next time, sendmail should *not* try to start.
For much more information on update-rc.d please use the following command:
man update-rc.d
Below is the actual man page posted for 'update-rc.d':
UPDATE-RC.D(8) sysv-rc UPDATE-RC.D(8)
NAME
update-rc.d - install and remove System-V style init script links
SYNOPSIS
update-rc.d [-n] [-f] name remove
update-rc.d [-n] name defaults [NN | SS KK]
update-rc.d [-n] name start|stop NN runlevel [runlevel]... .
start|stop NN runlevel [runlevel]... . ...
DESCRIPTION
update-rc.d updates the System V style init script links /etc/rcrun
level.d/NNname whose target is the script /etc/init.d/name. These
links are run by init when it changes runlevels; they are generally
used to start and stop system services such as daemons. runlevel is
one of the runlevels supported by init, namely, 0123456789S, and NN is
the two-digit sequence number that determines where in the sequence
init will run the scripts.
This manpage documents only the usage and behaviour of update-rc.d.
For a discussion of the System V style init script arrangements please
see init(8) and the Debian Policy Manual.
Please note that this program was designed for use in package main
tainer scripts and, accordingly, has only the very limited functional
ity 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.
INSTALLING INIT SCRIPT LINKS
When run with either the defaults, start, or stop options, update-rc.d
makes links /etc/rcrunlevel.d/[SK]NNname that point to the script
/etc/init.d/name.
If any files /etc/rcrunlevel.d/[SK]??name already exist then update-
rc.d does nothing. The program was written this way so that it will
never change an existing configuration, which may have been customized
by the system administrator. The program will only install links if
none are present, i.e., if it appears that the service has never been
installed before.
A common system administration error is to delete the links with the
thought that this will "disable" the service, i.e., that this will pre
vent the service from being started. However, if all links have been
deleted then the next time the package is upgraded, the package
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 symbolic links from S to K.
If defaults is used then update-rc.d will make links to start the ser
vice in runlevels 2345 and to stop the service in runlevels 016. By
default all the links will have sequence number 20, but this can be
overridden by supplying one NN or two SS and KK arguments; a single
argument overrides the sequence number for both start and stop links
whereas a pair of arguments overrides the sequence numbers for start
and stop links, respectively.
As a rule of thumb, the sequence number of the stop link should 100
minus the sequence number of the start link; this causes services to be
stopped in the opposite order to that in which they are started. Obvi
ously, therefore, the default stop sequence number should be 80.
Defaulting to 20, as update-rc.d does, is an old bug that cannot be
fixed because of the risk of breaking things.
Instead of defaults one can give one or more sets of arguments specify
ing particular runlevels in which to start or stop the service. Each
of these sets of arguments starts with the keyword start or stop and a
sequence number NN, followed by one or more runlevel numbers. The set
is terminated by a solitary full stop character. When explicit speciā
fication, rather than defaults, is used there will usually be one start
and one stop set. If different sequence codes are required in differ
ent runlevels then several start sets or several stop sets may be spec
ified.
The script /etc/init.d/name must exist before update-rc.d is run to
create the links.
REMOVING SCRIPTS
When invoked with the remove option, update-rc.d removes any links in
the /etc/rcrunlevel.d directories to the script /etc/init.d/name. The
script must have been deleted already. If the script is still present
then update-rc.d aborts with an error message.
update-rc.d is usually called from a package post-removal script when
that script is given the purge argument. Any files in the /etc/rcrun
level.d directories that are not symbolic links to the script
/etc/init.d/name will be left untouched.
OPTIONS
-n Don't do anything, just show what we would do.
-f Force removal of symlinks even if /etc/init.d/name still exists.
EXAMPLES
Insert links using the defaults:
update-rc.d foobar defaults
Equivalent command using explicit argument sets:
update-rc.d foobar start 20 2 3 4 5 . stop 20 0 1 6 .
More typical command using explicit argument sets:
update-rc.d foobar start 30 2 3 4 5 . stop 70 0 1 6 .
Remove all links for a script (assuming foobar has been deleted
already):
update-rc.d foobar remove
Example of disabling a service:
update-rc.d -f foobar remove
update-rc.d foobar stop 20 2 3 4 5 .
Example of a command for installing a system initialization-and-shut
down script:
update-rc.d foobar start 45 S . start 31 0 6 .
Example of a command for disabling a system initialization-and-shutdown
script:
update-rc.d -f foobar remove
update-rc.d foobar stop 45 S .
BUGS
See http://bugs.debian.org/sysv-rc.
FILES
/etc/init.d/
The directory containing the actual init scripts.
/etc/rc?.d/
The directories containing the links used by init and managed by
update-rc.d.
/etc/init.d/skeleton
Model for use by writers of init.d scripts.
SEE ALSO
Debian Policy Manual,
/etc/init.d/skeleton,
sysv-rc-conf(8), bum(8), init(8).
