I'm trying to install docker on ubuntu xenial and am following this tutorial: https://docs.docker.com/engine/installation/linux/ubuntulinux/. So far it's gone without a hitch except for there apparently not being a linux-image-extra for my kernel version (4.6.0-040600-generic). The tutorial said that that wasn't required, though, so I figured it wasn't completely necessary.

I got to the point of running sudo apt-get install docker-engine, and the install is hanging on Setting up docker-engine (1.11.2-0~xenial) .... I've looked at top and it's not using any cpu, so I don't think it's actually doing anything. I ended up restarting my computer, getting rid of the partly installed package with some combination of dpkg -r, apt-get --purge remove, and maybe some other related stuff that I've forgotten about, and I tried installing it again. It hung the same way.

How can I install this successfully?

2 Answers 2


This is because the service can't be started. You can interrupt the apt command by doing systemctl restart docker and then just following this solution: https://stackoverflow.com/a/37640824/287130

  • 3
    For me systemctl restart docker hangs, too. May 7, 2020 at 9:51
  • @SebastianBarth same here and systemctl stop docker then worked for me Oct 15, 2022 at 6:16

Try systemctl stop docker.service. That did it for me. Trying to restart it lead to a hang.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .