C4f1151075b447779af31e99d6cf70e2c6eb47ac
By:
newbie

Remove unnecessary web services pre-installed with Ubuntu 16.04

January 11, 2017 751 views
LEMP Server Optimization Security Ubuntu 16.04

Hi,
on a fresh ubuntu 16.04 there are many services pre-installed. i want to know are there any services that are not required with my following setup?

I ill be having a wordpress site on LEMP and a php application.

more importantly, removing those unnecessary services will give me any significant benefits? i mean does it worth the effort?

thanks in advance.

2 Answers
ryanpq MOD January 11, 2017
Accepted Answer

Our Ubuntu images are pretty basic, providing the core distribution. While it may be possible to disable or remove a few services the time involved in doing so would likely not be worth the effort in terms of disk space and resources (RAM/CPU) saved.

Packages within the core distribution of Ubuntu have a lot of inter-dependencies so often, removing something you don't think is needed could end up also removing (or trying to) services that are necessary or directly related to what you want to run.

@newbie

The Ubuntu images provided by DigitalOcean are pretty basic and very close to the minimal images provided by Ubuntu, so there's really nothing to remove.

That being said, when you begin installing packages from the CLI, it is possible that some packages will be installed that you do not want or need, but there is a remedy for that, too!

When running:

sudo apt-get install -y package package-two package-three

Add --no-install-recommends to the end.

So the actual command will look like:

sudo apt-get install -y package package-two package-three --no-install-recommends

That'll help keep things clean and prevent often useless packages from being installed when they don't need to be.

Have another answer? Share your knowledge.