Removing Unwanted Startup Debian Files or Services

by admin on October 27, 2005 · 12 comments

in Desktop Linux, Tip that matters

Under Debian Linux ( and most other distros) startup files are stored in /etc/init.d/ directory and symbolic linked between /etc/rcX.d/ directory exists. Debian Linux (Red Hat/ Fedora) uses System V initialization scripts to start services at boot time from /etc/rcX.d/ directory. Debian Linux comes with different utilities to remove unwanted startup file:

(A) rcconf
It is a console based interactive utility that allows you to control which services are started when the system boots up or reboots. It displays a menu of all the services which could be started at boot. The ones that are configured to do so are marked and you can toggle individual services on and off. To start rconf, login as root user and type rcconf
# rcconf


Debian rcconf - a console based utility to control startup services

Select the service you would like to enable or disable.

(B) sysv-rc-conf is yet another tool for for SysV like init script links under Debian Linux. To start sysv-rc-conf, login as root user and type sysv-rc-conf:
# sysv-rc-conf


Debian sysv-rc-conf - a console based advanced utility to control startup services

Select the service you would like to enable or disable.

Both sysv-rc-conf and rcconf are best tools to use on Remote Debian Linux or when GUI is not available, they are just like ntsysv command under Red Hat Linux.

(C) You can also use update-rc.d script as follows (update-rc.d removes any links in the /etc/rcX.d directories to the script /etc/init.d/service):
# update-rc.d -f {SERVICE-NAME} remove

For example to stop xinetd service at boot time, type the command as follows:
# update-rc.d -f xinetd remove

{ 12 comments… read them below or add one }

1 Sch1z0 December 3, 2005 at 12:50 pm

well i googled rcconf configure and reached here…. what i need is to speed up starting of comp so can you tell me which services are unnecessary ?

Reply

2 Administrator December 5, 2005 at 6:36 am

It depends upon your applications. For example if you run web server then you only need

httpd (80)
mysql
sshd
mail service
syslogd
klogd
cron

Rest of the service can be disabled for example
lpd (printing service)
autofs (until and unless you wanna mount something remotely or locally)
dbus-1 ( manages certificate revocation lists)
portmap, rpc services, nfs server (for unix to unix/linux file sharing)
telnetd, relogin, rexec (all insecure remote login service, it is better to use ssh)
inetd or xinetd (disabled all those r services, finger, time etc)
named (Do you need your own dedicated name server?)

All create a firewall, to accept service according to your server services

Reply

3 Sch1z0 December 6, 2005 at 7:17 pm

thanks dude, i appreciate your concern

Reply

4 nachiappan November 20, 2007 at 5:09 pm

i have installed rcconf and i want to remove HP printing process as i don’t have a printer
can u help me in detail about disabling a process using rcconf.

Reply

5 casaannonce ma November 19, 2008 at 8:37 am

I have linspire linux, these commands did not work for me.

Reply

6 Michael September 4, 2009 at 1:54 pm

Hello,

Please let me know how to upgrade the package repository in debian.

Reply

7 cameleon September 23, 2009 at 8:14 am

salam

Please let me know how to upgrade the package repository in debian.
salam

Reply

8 khan October 19, 2009 at 10:14 am

updating the package list
apt-get update
upgrading packages (after updating the package list)
apt-get upgrade

Reply

9 abdurrahman March 2, 2010 at 1:16 pm

as a Debian user i use rcconf, and it works great… :-)
you could always go for a apt-get install if you cant find it in the system…
anyway nice article

Reply

10 Oren January 2, 2012 at 9:06 pm

From what I know, when using update-rc.d to remove a service, the service might come back on package upgrade (it simply brings back the rc files).

So I don’t find it a full-proof way to remove a service, so far uninstalling the package was the only full-proof way I’ve found.

I’m not sure if rcconf acts differently, but I bet not…

Any other experiences?

10x

Reply

11 the dsc November 24, 2012 at 5:09 pm

What I’ve found:

“Note: This command will only disable the service until next time the service is upgraded. If you want to make sure the service won’t be re-enabled upon upgrade, you should also type the following:
# update-rc.d apache2 stop 80 0 1 2 3 4 5 6″

From: http://www.debuntu.org/how-to-manage-services-with-update-rc.d

It will rename the links with a “K” instead of an “S” or something, I don’t know if that effectively make them not be started or just started and immediatelly killed, I hope it’s the former because the later sounds really dumb.

I wonder if there’s differences in this regard when managing it via sysv-rc-conf and rcconf. Perhaps one may disable it with a “stop” rather than the alternative that is ignored on upgrade.

Reply

12 the dsc November 24, 2012 at 5:17 pm

I’ve always felt that the a single-script format is somewhat better, even though I’m not sure at all, it’s just my guess.

Every script could be a function perhaps, and then there’s initially the declaration of functions and then the “commands” calling these functions. When you don’t want a service you could just remove the call to the function, preserving the function itself intact, if you want to use it on demand.

I think that the whole file-rc system does something along these lines, except perhaps something that makes more sense as I’ve just made that up and I’m not an expert. I think Arch linux uses something similar, or used to have before they changed to systemd or upstart.

But maybe that’s very bad for various reasons.

Reply

Previous post:

Next post: