Skip to content

Commit c572de1

Browse files
authored
Merge pull request docker#17415 from dvdksn/engine/aptget-remove-fix
engine: fix apt-get remove command for uninstall preexisting packages
2 parents ad7d440 + 2aa6ad3 commit c572de1

File tree

3 files changed

+63
-15
lines changed

3 files changed

+63
-15
lines changed

engine/install/debian.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,29 @@ architectures.
3131

3232
### Uninstall old versions
3333

34-
Older versions of Docker went by the names of `docker`, `docker.io`, or
35-
`docker-engine`, you might also have installations of `containerd` or `runc`.
36-
Uninstall any such older versions before attempting to install
37-
a new version:
34+
Before you can install Docker Engine, you must first make sure that any
35+
conflicting packages are uninstalled.
36+
37+
Distro maintainers provide an unofficial distributions of Docker packages in
38+
APT. You must uninstall these packages before you can install the official
39+
version of Docker Engine.
40+
41+
The unofficial packages to uninstall are:
42+
43+
- `docker.io`
44+
- `docker-compose`
45+
- `docker-doc`
46+
- `podman-docker`
47+
48+
Moreover, Docker Engine depends on `containerd` and `runc`. Docker Engine
49+
bundles these dependencies as one bundle: `containerd.io`. If you have
50+
installed the `containerd` or `runc` previously, uninstall them to avoid
51+
conflicts with the versions bundled with Docker Engine.
52+
53+
Run the following command to uninstall all conflicting packages:
3854

3955
```console
40-
$ sudo apt-get remove docker docker-engine docker.io containerd runc
56+
$ for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
4157
```
4258

4359
`apt-get` might report that you have none of these packages installed.

engine/install/raspbian.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,29 @@ For the 64-bit version of Raspbian follow the instructions for [Debian](debian.m
2929

3030
### Uninstall old versions
3131

32-
Older versions of Docker went by the names of `docker`, `docker.io`, or
33-
`docker-engine`, you might also have installations of `containerd` or `runc`.
34-
Uninstall any such older versions before attempting to install
35-
a new version:
32+
Before you can install Docker Engine, you must first make sure that any
33+
conflicting packages are uninstalled.
34+
35+
Distro maintainers provide an unofficial distributions of Docker packages in
36+
APT. You must uninstall these packages before you can install the official
37+
version of Docker Engine.
38+
39+
The unofficial packages to uninstall are:
40+
41+
- `docker.io`
42+
- `docker-compose`
43+
- `docker-doc`
44+
- `podman-docker`
45+
46+
Moreover, Docker Engine depends on `containerd` and `runc`. Docker Engine
47+
bundles these dependencies as one bundle: `containerd.io`. If you have
48+
installed the `containerd` or `runc` previously, uninstall them to avoid
49+
conflicts with the versions bundled with Docker Engine.
50+
51+
Run the following command to uninstall all conflicting packages:
3652

3753
```console
38-
$ sudo apt-get remove docker docker-engine docker.io containerd runc
54+
$ for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
3955
```
4056

4157
`apt-get` might report that you have none of these packages installed.

engine/install/ubuntu.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,29 @@ s390x architectures.
3838

3939
### Uninstall old versions
4040

41-
Older versions of Docker went by the names of `docker`, `docker.io`, or
42-
`docker-engine`, you might also have installations of `containerd` or `runc`.
43-
Uninstall any such older versions before attempting to install
44-
a new version:
41+
Before you can install Docker Engine, you must first make sure that any
42+
conflicting packages are uninstalled.
43+
44+
Distro maintainers provide an unofficial distributions of Docker packages in
45+
APT. You must uninstall these packages before you can install the official
46+
version of Docker Engine.
47+
48+
The unofficial packages to uninstall are:
49+
50+
- `docker.io`
51+
- `docker-compose`
52+
- `docker-doc`
53+
- `podman-docker`
54+
55+
Moreover, Docker Engine depends on `containerd` and `runc`. Docker Engine
56+
bundles these dependencies as one bundle: `containerd.io`. If you have
57+
installed the `containerd` or `runc` previously, uninstall them to avoid
58+
conflicts with the versions bundled with Docker Engine.
59+
60+
Run the following command to uninstall all conflicting packages:
4561

4662
```console
47-
$ sudo apt-get remove docker docker-engine docker.io containerd runc
63+
$ for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
4864
```
4965

5066
`apt-get` might report that you have none of these packages installed.

0 commit comments

Comments
 (0)