Apt-get install prompts for restart services when installing packages (SOLVED)

The problem

When you install with apt-get you will see a question that asks (scroll down to see the solution):

apt-get install prompt

Restart services during package upgrades without asking?


To avoid any prompt at all use the variable DEBIAN_FRONTEND=noninteractive:

 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libpq-dev