Ubuntu – How to disable unnecessary services without uninstalling them in Ubuntu 15.10

15.10servicessystemdupstart

There are some daemons I make zero use of and would like prevent from autostarting, those include avahi, zeitgeist, telepathy, apport and some others. Needless to say I'd like them not to start. Can this be achieved without uninstalling them (there still are dependencies and I even believe an occasion can heppen when I'll actually need them)?

Best Answer

Yes, because you are using Ubuntu 15.10, you can now use systemd to disable these unwanted services.

You have two options: disable & mask.

OPTION ONE:

When you mask a service, you prevent any user or service from starting this service by creating a symlink to /dev/null.

To mask a service:

For example to completely disable apport, run the following command:

sudo systemctl stop apport
sudo systemctl mask apport
systemctl status apport

If successful, the last command should return the following:

‚óŹ apport.service
   Loaded: masked (/dev/null)
   Active: inactive (dead)

OPTION TWO:

When you disable a service, you prevent the service from loading automatically at boot time.

However, the service may still start if called by another service when disabled and you can still start the service up by explicitly calling the service.

To disable a service:

To prevent apport from starting at boot, run the following command:

sudo systemctl stop apport
sudo systemctl disable apport
systemctl status apport

Run the following command for a more complete list and use grep to narrow the results:

systemctl status -a