Languages
[Edit]
EN

Docker - remove images older than some specific period of time

3 points
Created by:
Marcin
20330

Quick solution:

# delete images older than: 1 day (24h)
docker image prune --all --filter "until=24h"

# delete images older than: 168h == 7 days == 1 week
docker image prune --all --filter "until=168h"

# delete images older than: 336h == 14 days == 2 weeks
docker image prune --all --filter "until=336h"

# delete images older than: 504h == 21 days == 3 weeks
docker image prune --all --filter "until=504h"

# delete images older than: 720h == 30 days == 4 weeks ~= 1 month
docker image prune --all --filter "until=720h"

 

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join