clean command marks resources for cleaning by setting
desired.clean=true to the resources. Resources marked as such will be removed during the
cleanup phase of the next
collect_and_cleanup workflow run.
clean command expects query results (objects) or an array of object IDs to be piped as input. Optionally, you can provide a reason for marking the matched resources to be pruned during the next cleanup run. The reason is logged and can be useful in reviewing why a particular resource was deleted.
It is also possible to mark resources as protected using the
protect command. Protected resources will never be cleaned up.
|Reason for cleanup||❌|
> search is(volume) and last_access>1month | clean "Volume not accessed for longer than 1 month" | list id, /desired
> json ["vol-123"] | clean | list id, /desired
> search is(volume) and ctime < -30d and atime < -7d and mtime < -7d and volume_status = available | clean "older than 30d with more then 7d of not beeing used"