# block storage

Block Storage v3

## block storage cleanup

Do block storage cleanup.

This command requires `--os-volume-api-version` 3.24 or greater.

    openstack block storage cleanup
        [--format-config-file FORMAT_CONFIG]
        [--sort-column SORT_COLUMN]
        [--sort-ascending | --sort-descending]
        [--cluster <cluster>]
        [--host <host>]
        [--binary <binary>]
        [--up | --down]
        [--disabled | --enabled]
        [--resource-id <resource-id>]
        [--resource-type <Volume|Snapshot>]
        [--service-id SERVICE_ID]

--format-config-file <FORMAT_CONFIG>

  Config file for the dict-to-csv formatter

--sort-column SORT_COLUMN

  specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

  sort the column(s) in ascending order

--sort-descending

  sort the column(s) in descending order

--cluster <cluster>

  Name of block storage cluster in which cleanup needs to be performed (name only)

--host <host>

  Host where the service resides. (name only)

--binary <binary>

  Name of the service binary.

--up

  Filter by up status. If this is set, services need to be up.

--down

  Filter by down status. If this is set, services need to be down.

--disabled

  Filter by disabled status.

--enabled

  Filter by enabled status.

--resource-id <resource-id>

  UUID of a resource to cleanup.

--resource-type <Volume|Snapshot>

  Type of resource to cleanup.

--service-id <SERVICE_ID>

  The service ID field from the DB, not the UUID of the service.

this page last updated: 2026-04-01 09:44:20

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.