Prometheus · Arazzo Workflow
Prometheus Delete Series and Reclaim the Space
Version 1.0.0
Preview what a selector matches, delete it, clean the tombstones, and verify.
Provider
Workflows
delete-series-reclaim-space
Safely delete matching series and force the space to be reclaimed.
Both admin endpoints require the --web.enable-admin-api flag and return 403 without it. The preview step is not optional in practice — a selector that is broader than intended deletes far more than expected, and there is no undo.
1
previewSeries
querySeries
Resolve the selector to the exact label sets it matches. This is the last chance to catch a selector that is broader than intended, and the count here is precisely what the delete will destroy.
2
measureBefore
getTsdbStatus
Record the TSDB head statistics before the deletion so the reclaimed series count can be shown rather than assumed.
3
deleteSeries
deleteTsdbSeries
Create deletion tombstones for the matched series. This returns 204 and the data becomes unqueryable immediately, but nothing has actually left the disk yet.
4
cleanTombstones
cleanTombstones
Force the tombstoned data off disk rather than waiting for the next natural compaction. This triggers a compaction of every block carrying tombstones and is the step that actually reclaims the space.
5
verifyDeleted
querySeries
Re-run the preview selector and confirm it now matches nothing, proving the deletion took effect rather than silently failing.
6
measureAfter
getTsdbStatus
Read the TSDB head statistics again so the before and after series counts quantify what the deletion actually reclaimed.
Source API Descriptions
openapi