---
title: "prune images"
method: POST
path: "/api/v1/container/prune/images"
tags: ["api/v1/container"]
---

# prune images

`POST /api/v1/container/prune/images`

#### Controller: 

`github.com/raghavyuva/nixopus-api/internal/features/container/controller.(*ContainerController).PruneImages`

#### Middlewares:

- `github.com/go-fuego/fuego.defaultLogger.middleware`
- `github.com/raghavyuva/nixopus-api/internal/routes.(*Router).SetupRoutes.(*Router).setupAuthentication.func2`
- `github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func1`
- `github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func2`
- `github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func3`

---

## Headers

- `Accept` string

## Response `200`

OK

- PruneImagesResponse — PruneImagesResponse schema
  - `data` object
    - `images_deleted` object[], nullable
      - `deleted` string, nullable
      - `untagged` string, nullable
    - `space_reclaimed` integer
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request _(validation or deserialization error)_
- `500` — Internal Server Error _(panics)_
- `default`

## Changes

- **2026-02-27** `93bf2b2f361d` — 16 breaking
  - the response property `data/images_deleted/items/` became nullable for the status `200` (media type: application/json)
  - the response property `data/images_deleted/items/` became nullable for the status `200` (media type: application/xml)
  - the response property `data/images_deleted/items/deleted` became nullable for the status `200` (media type: application/json)
  - the response property `data/images_deleted/items/deleted` became nullable for the status `200` (media type: application/xml)
  - …12 more

[Change history](https://skmtc.dev/nixopus/apis/openapi/changes/api/v1/container/prune/images/post.md)

---

[API](https://skmtc.dev/nixopus/apis/openapi.md) · [All operations](https://skmtc.dev/nixopus/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nixopus/openapi/revisions/93bf2b2f361d/schema)
