Fast way of deleting non-empty Google bucket?

前端 未结 7 1639
一整个雨季
一整个雨季 2021-02-07 02:05

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 bucke         


        
7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 02:16

    Using Python client, you can force a delete within your script by using:

    bucket.delete(force=True)
    

    Try out a similar thing in your current language.

    Github thread that discusses this

提交回复
热议问题