I had other issues including "Unable" in Ubuntu 16.04. This is bash script to solve issues in my machine.
#!/bin/bash
sudo apt update
sudo rm /var/lib/apt/lists/*
sudo rm /var/cache/apt/*.bin
VERSION-NAME=$(lsb_release -c)
y=$(echo $VERSION-NAME | awk '{print $2}')
echo $y
cd /etc/apt/sources.list.d
touch docker_test.list
echo "deb https://apt.dockerproject.org/repo ubuntu-$y main" > docker_test.list
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get update
sudo apt-get install docker.io
I had different issue when I had to uninstall Docker at the time. This is bash script (source) for my machine.
# For unistall in Ubuntu
sudo apt-get purge docker.io
# This will erase all your container images
sudo rm -rf /var/lib/docker
# This will erase all docker configs
sudo rm -rf /etc/docker/
sudo apt-get purge docker.io
/etc/apt/sources.list.d/docker.list
and add the correct deb entries for your Ubuntu? – Tung Tran Dec 15 '15 at 10:26deb https://apt.dockerproject.org/repo ubuntu-trusty main
avi@guest-Inspiron-1464:~$ apt-cache policy docker-engine
N: Unable to locate package docker-engine
– igx Dec 15 '15 at 14:05sudo apt-get update
after modifyingdocker.list
? That did the trick for me. – NauticalMile Feb 19 '16 at 18:11