Is this my only option or is there a faster way?
# Delete contents in bucket (takes a long time on large bucket) gsutil -m rm -r gs://my-bucket/* # Remove bucket gsutil rb gs://my-bucket/
In the Buckets list, select the option next to the name of the bucket that you want to delete, and then choose Delete at the top of the page. On the Delete bucket page, confirm that you want to delete the bucket by entering the bucket name into the text field, and then choose Delete bucket.
Open the iCloud Drive folder and tap Recently Deleted. Select the folders or files that you want to delete. Tap Delete.
Buckets are required to be empty before they're deleted. So before you can delete a bucket, you have to delete all of the objects it contains.
You can do this with gsutil rm -r
(documentation). Just don't pass the *
wildcard and it will delete the bucket itself after it has deleted all of the objects.
gsutil -m rm -r gs://my-bucket
Google Cloud Storage bucket deletes can't succeed until the bucket listing returns 0 objects. If objects remain, you can get a Bucket Not Empty error (or in the UI's case 'Bucket Not Ready') when trying to delete the bucket.
gsutil
has built-in retry logic to delete both buckets and objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With