Image

Delete builder cache

Changed on
post/build/prune

Request

  • Base URL
    /v1.49 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1.49/build/prune
  • Auth
    none declared

Query parameters

keep-storageinteger

Amount of disk space in bytes to keep for cache

Deprecated: This parameter is deprecated and has been renamed to "reserved-space". It is kept for backward compatibility and will be removed in API v1.49.

reserved-spaceinteger

Amount of disk space in bytes to keep for cache

max-used-spaceinteger

Maximum amount of disk space allowed to keep for cache

min-free-spaceinteger

Target amount of free disk space after pruning

allboolean

Remove all types of build cache

filtersstring

A JSON encoded value of the filters (a map[string][]string) to process on the list of build cache objects.

Available filters:

  • until=<timestamp> remove cache older than <timestamp>. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon's local time.
  • id=<id>
  • parent=<id>
  • type=<string>
  • description=<string>
  • inuse
  • shared
  • private

Response

No error

CachesDeletedstring[]
SpaceReclaimedinteger

Disk space reclaimed in bytes

Changes

    • info

      added the new optional query request parameter max-used-space

    • info

      added the new optional query request parameter min-free-space

    • info

      added the new optional query request parameter reserved-space

    • warning

      deleted the query request parameter max-used-space

    • warning

      deleted the query request parameter min-free-space

    • warning

      deleted the query request parameter reserved-space