5

After some time of creating and removing stacks and services on my Docker Swarm cluster, the lists returned by docker config ls and docker secret ls are quite extensive. However, a lot of the listed configs and secrets are outdated leftovers from previous deployments and not referenced anymore by any running service.

Is there any quick equivalent to docker system prune which will clean-up the config and secret stores from unreferenced items?

Dirk
  • 9,381
  • 17
  • 70
  • 98

1 Answers1

2

Unfortunately there is no way to easily remove them. My current solution to prune all unused configs is:

docker config rm $(docker config ls -q)

LBR8
  • 61
  • 4