@@ -88,10 +88,10 @@ conflicts with the versions bundled with Docker Engine.
8888Run the following command to uninstall all conflicting packages:
8989
9090``` console
91- $ for pkg in docker.io docker-doc docker- compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg ; done
91+ $ sudo apt remove $( dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1 )
9292```
9393
94- ` apt-get ` might report that you have none of these packages installed.
94+ ` apt ` might report that you have none of these packages installed.
9595
9696Images, containers, volumes, and networks stored in ` /var/lib/docker/ ` aren't
9797automatically removed when you uninstall Docker. If you want to start with a
@@ -126,8 +126,8 @@ Docker from the repository.
126126
127127 ``` bash
128128 # Add Docker's official GPG key:
129- sudo apt-get update
130- sudo apt-get install ca-certificates curl
129+ sudo apt update
130+ sudo apt install ca-certificates curl
131131 sudo install -m 0755 -d /etc/apt/keyrings
132132 sudo curl -fsSL {{% param " download-url-base" %}}/gpg -o /etc/apt/keyrings/docker.asc
133133 sudo chmod a+r /etc/apt/keyrings/docker.asc
@@ -141,7 +141,7 @@ Docker from the repository.
141141 Signed-By: /etc/apt/keyrings/docker.asc
142142 EOF
143143
144- sudo apt-get update
144+ sudo apt update
145145 ` ` `
146146
1471472. Install the Docker packages.
@@ -152,7 +152,7 @@ Docker from the repository.
152152 To install the latest version, run:
153153
154154 ` ` ` console
155- $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
155+ $ sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
156156 ` ` `
157157
158158 {{< /tab > }}
@@ -162,19 +162,18 @@ Docker from the repository.
162162 available versions in the repository:
163163
164164 ` ` ` console
165- # List the available versions:
166- $ apt-cache madison docker-ce | awk '{ print $3 }'
165+ $ apt list --all-versions docker-ce
167166
168- 5:{{% param "docker_ce_version" %}}-1~ubuntu.24.04~noble
169- 5:{{% param "docker_ce_version_prev" %}}-1~ubuntu.24.04~noble
167+ docker-ce/noble 5:{{% param "docker_ce_version" %}}-1~ubuntu.24.04~noble <arch>
168+ docker-ce/noble 5:{{% param "docker_ce_version_prev" %}}-1~ubuntu.24.04~noble <arch>
170169 ...
171170 ` ` `
172171
173172 Select the desired version and install:
174173
175174 ` ` ` console
176175 $ VERSION_STRING=5:{{% param "docker_ce_version" %}}-1~ubuntu.24.04~noble
177- $ sudo apt- get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
176+ $ sudo get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
178177 ` ` `
179178
180179 {{< /tab > }}
@@ -288,7 +287,7 @@ To upgrade Docker Engine, download the newer package files and repeat the
2882871. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
289288
290289 ` ` ` console
291- $ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
290+ $ sudo apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
292291 ` ` `
293292
2942932. Images, containers, volumes, or custom configuration files on your host
0 commit comments