Skip to content

Commit a1cbc85

Browse files
committed
Update README.md
1 parent 3faaf9d commit a1cbc85

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,29 +201,36 @@ docker compose stop
201201
### Removing containers
202202

203203
To stop and remove all the containers use the `down` command:
204-
205204
```
206205
docker compose down
207206
```
208207

209-
to remove portainer and the other containers
208+
to remove portainer and the other containers:
210209
```
211210
docker rm -f $(docker ps -a -q)
212211
```
213212

214213
Use `-v` if you need to remove the database volume which is used to persist the database:
215-
216214
```
217215
docker compose down -v
218216
```
219217

220-
to remove external certbot-etc and portainer and the other volumes
221-
218+
to remove external certbot-etc and portainer and the other volumes:
222219
```
223220
docker volume rm $(docker volume ls -q)
224221
```
225222

226-
to remove portainer and the other images
223+
Delete all images, containers, volumes, and networks that are not associated with a container (dangling):
224+
```
225+
docker system prune
226+
```
227+
228+
To additionally remove any stopped containers and all unused images (not just dangling ones), add the -a flag to the command:
229+
```
230+
docker system prune -a
231+
```
232+
233+
to remove portainer and the other images:
227234
```
228235
docker rmi $(docker image ls -q)
229236
```

0 commit comments

Comments
 (0)