How to downgrade docker to a specific version?

how to downgrade docker version? from 17.03.0-ce to 1.12.6

1 Like

nevermind i just figured it out, thanks :slight_smile:

1 Like

Hi

and how did you do it ?

what distro you running? the most common case is package-name=version
e.g. (on debian and debian-based) this example is on Raspbian
Stop all of the containers/services you’re running, prune if you can.

It’s recommended to uninstall docker and reboot, yet not mandatory

Or just uninstall and do the following:

sudo apt-get autoremove -y docker-engine \
&& sudo apt-get purge docker-engine -y \
&& sudo rm -rf /etc/docker/ \
&& sudo rm -f /etc/systemd/system/multi-user.target.wants/docker.service \
&& sudo rm -rf /var/lib/docker \
&&  sudo systemctl daemon-reload

then sudo apt-cache policy docker-engine this will show the list of docker packages available

docker-engine:
  Installed: 17.03.1~ce-0~raspbian-jessie
  Candidate: 17.05.0~ce-0~raspbian-jessie
  Version table:
     17.05.0~ce-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     17.04.0~ce-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
 *** 17.03.1~ce-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
        100 /var/lib/dpkg/status
     17.03.0~ce-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.13.1-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.13.0-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.6-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.5-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.4-0~raspbian-jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.3-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.2-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages
     1.12.1-0~jessie 0
        500 https://apt.dockerproject.org/repo/ raspbian-jessie/main armhf Packages

Choose the package you want to downgrade to and do the installation

sudo apt-get install -y docker-engine=1.12.6-0~raspbian-jessie

1 Like

Is there a way to downgrade to the version which is not in list of docker packages available?
I’m interested in 1.9.1