Skip to main content
NetApp Knowledge Base

How to check if an object has delete markers for StorageGRID

Views:
38
Visibility:
Public
Votes:
0
Category:
storagegrid
Specialty:
esg
Last Updated:

Applies to

StorageGRID

Answer

To check for  the existence of delete makers in a bucket against an object, you can run the following command via AWS CLI:

aws --profile   --endpoint-url    s3api list-object-versions --bucket --prefix --no-verify-ssl

If delete markers exist, the output will show a "DeleteMarkers" section as shown below:

{
    "Versions": [
        {
            "ETag": "\"b072axxxxxc5096af6xxxxxx737dd87e\"",
            "Size": 70685,
            "StorageClass": "STANDARD",
            "Key": "image.png",
            "VersionId": "NTlEMUMwN0MtMDkwQS0xMUYxLTlERUMtQ0ZCQTAwQkU3NTE1",
            "IsLatest": false,
            "LastModified": "2026-02-13T18:32:28.643Z",
            "Owner": {
                "DisplayName": "deactivate EC",
                "ID": "40430905654028310759"
            }
        }
    ],
    "DeleteMarkers": [
        {
            "Owner": {
                "DisplayName": "deactivate EC",
                "ID": "40430905654028310759"
            },
            "Key": "image.png",
            "VersionId": "QjgyMjJFRTAtMDkwQi0xMUYxLTg5MDYtRDA3MzAwQkQzNjlD",
            "IsLatest": true,
            "LastModified": "2026-02-13T18:42:16.373Z"
        }
    ],
    "RequestCharged": null,
    "Prefix": ""
}

If no delete markers are found, the output will not show a "DeleteMarkers" section and "IsLatest" will be "true"  as shown below:

{
    "Versions": [
        {
            "ETag": "\"41xxxx407a01ddxxxxxx81309fbxxxx1-1\"",
            "Size": 35487,
            "StorageClass": "STANDARD",
            "Key": "GXD-XXX-1/NEW_DOCUMENT1/FILE-1.pdf",
            "VersionId": "Njg3QTMzQzQtRTY1Ni0xMUYwLTlFNEUtMkFGRDAwQzJBQjRG",
            "IsLatest": true,
            "LastModified": "2025-12-31T14:38:44.352000+00:00",
            "Owner": {
                "DisplayName": "nve",
                "ID": "51881xxxxx714256xxx2"
            }
        }
    ],
    "RequestCharged": null,
    "Prefix": "GXD-XXX-1/NEW_DOCUMENT1/FILE-1.pdf"
}

Additional Information

additionalInformation_text
NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.