Question

Remove unnecessary web services pre-installed with 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.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Ryan Quinn
DigitalOcean Employee
DigitalOcean Employee badge
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.

You can also get a list of packages installed using the command

$ apt-cache pkgnames

and pipe that to a file if you want to look up each package and check what it is.

$ apt-cache pkgnames | tee pkgnames.txt

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel