Unable to delete S3 bucket with error "Reason: Cannot delete bucket because it is not empty"
Applies to
- ONTAP 9.9.1 and earlier
- ONTAP S3
Issue
- Cannot delete an S3 bucket because the bucket is not empty:
::> vserver object-store-server bucket delete -bucket bucket1
Error: command failed: Failed to remove bucket "bucket1" for Vserver "svm1". Reason: Cannot delete bucket "bucket1" on Vserver "svm1" because it is not empty. Delete the objects, and then try the operation again. For further assistance, contact technical support.
- The
object-count
shows 0 which means the bucket does not contain any objects:
::> vserver object-store-server bucket show -vserver svm1 -bucket bucket1 -fields object-count
vserver bucket object-count
----------------- -------- ------------
svm1 bucket1 0