↑ ↓ select, Enter open, Esc close

Remove dangling Docker images

Caution: This command changes the system. Understand what it does before you run it.

root@server
docker image prune

Removes so-called dangling images, recognizable by <none> in docker images. They are created when a tag points to a different image after docker pull or a new build. Docker asks before deleting and reports the freed space at the end.

Note: With -a, all images not used by any container are deleted as well, including locally built ones that cannot be downloaded again. Docker commands require root or the docker group.

Also searched as

  • docker remove unused images
  • delete none images docker
  • docker image prune

Related one-liners

All in Docker

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.