{
  "id": 70510,
  "title": "Is there an easy way to delete entire dataset from Google storage?",
  "url": "/competitions/inclusive-images-challenge/discussion/70510",
  "author_name": "",
  "post_date": "2018-11-04T18:40:51.979242400Z",
  "votes": null,
  "comment_count": 9,
  "views": 0,
  "content": "<p>I am trying to delete the entire dataset which i transferred  to GCP bucket. But, i am unable to . I am currently using gsutil -m rm -r gs://[Bucket Name] in the cloud shell. But, its taking too much time. I have also set Life Cycle rule to delete it after 1 day. But, nothing happened. Can anyone help me with this!</p>",
  "messages": [
    {
      "id": "415249",
      "postDate": "11/04/2018 18:40:51",
      "content": "<p>I am trying to delete the entire dataset which i transferred  to GCP bucket. But, i am unable to . I am currently using gsutil -m rm -r gs://[Bucket Name] in the cloud shell. But, its taking too much time. I have also set Life Cycle rule to delete it after 1 day. But, nothing happened. Can anyone help me with this!</p>",
      "rawMarkdown": "I am trying to delete the entire dataset which i transferred  to GCP bucket. But, i am unable to . I am currently using gsutil -m rm -r gs://[Bucket Name] in the cloud shell. But, its taking too much time. I have also set Life Cycle rule to delete it after 1 day. But, nothing happened. Can anyone help me with this!",
      "votes": null
    },
    {
      "id": "415301",
      "postDate": "11/04/2018 20:57:19",
      "content": "<p>Try deleting it from the browser on GCS page.</p>",
      "rawMarkdown": "Try deleting it from the browser on GCS page.",
      "votes": null
    },
    {
      "id": "415426",
      "postDate": "11/05/2018 05:24:47",
      "content": "<p>In my opinion, to delete a bucket will be rather instant, otherwise you may use the web interface of GCP: Click to the hamburger icon in the top left corner -&gt; Storage -&gt; your bucket.\nHowever generic sequence that you seem to use is :</p>\n\n<pre><code>gsutil rm gs://[BUCKET_NAME]/[OBJECT_NAME]\n</code></pre>\n\n<p>and to delete a bucket you may use:</p>\n\n<pre><code>gsutil rm -r gs://[BUCKET_NAME]\n</code></pre>\n\n<p><a href=\"https://cloud.google.com/storage/docs/deleting-objects\">https://cloud.google.com/storage/docs/deleting-objects</a></p>",
      "rawMarkdown": "In my opinion, to delete a bucket will be rather instant, otherwise you may use the web interface of GCP: Click to the hamburger icon in the top left corner -&gt; Storage -&gt; your bucket.\nHowever generic sequence that you seem to use is :\n\n    gsutil rm gs://[BUCKET_NAME]/[OBJECT_NAME]\nand to delete a bucket you may use:\n\n    gsutil rm -r gs://[BUCKET_NAME]\n\nhttps://cloud.google.com/storage/docs/deleting-objects",
      "votes": null
    },
    {
      "id": "415452",
      "postDate": "11/05/2018 06:24:22",
      "content": "<p>I did try that. since its a folder inside with many files, its taking too long after i click delete button.</p>",
      "rawMarkdown": "I did try that. since its a folder inside with many files, its taking too long after i click delete button.",
      "votes": null
    },
    {
      "id": "415453",
      "postDate": "11/05/2018 06:26:13",
      "content": "<p>Hey Andrei, i did try your approach, its deleting the files one by one. Its taking too long for that. Also, when i try to do that in the GUI, i am not getting that popup messages which asks me for confirmation to delete bucket. </p>",
      "rawMarkdown": "Hey Andrei, i did try your approach, its deleting the files one by one. Its taking too long for that. Also, when i try to do that in the GUI, i am not getting that popup messages which asks me for confirmation to delete bucket.",
      "votes": null
    },
    {
      "id": "415493",
      "postDate": "11/05/2018 08:20:16",
      "content": "<p>may be the faster delete will only be possible with using disks [ssd] or <a href=\"https://cloud.google.com/filestore/\">filestore</a>, rather than gs.\nSome references: <a href=\"https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket\">https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket</a>\n<a href=\"https://cloud.google.com/storage/docs/gsutil/commands/lifecycle\">https://cloud.google.com/storage/docs/gsutil/commands/lifecycle</a>\nif you have set the lifecycle to 1 day than objects will likely to be wiped based on that policy, in my opinion.\nYou should have used a json file with contents like the below:</p>\n\n<pre><code>{\n\n\n \"rule\":\n  [\n    {\n      \"action\": {\"type\": \"Delete\"},\n      \"condition\": {\"age\": 1}\n    }\n  ]\n}\n</code></pre>",
      "rawMarkdown": "may be the faster delete will only be possible with using disks [ssd] or [filestore][1], rather than gs.\nSome references: https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket\nhttps://cloud.google.com/storage/docs/gsutil/commands/lifecycle\nif you have set the lifecycle to 1 day than objects will likely to be wiped based on that policy, in my opinion.\nYou should have used a json file with contents like the below:\n\n    {\n \n\n     \"rule\":\n      [\n        {\n          \"action\": {\"type\": \"Delete\"},\n          \"condition\": {\"age\": 1}\n        }\n      ]\n    }\n\n  [1]: https://cloud.google.com/filestore/",
      "votes": null
    },
    {
      "id": "415497",
      "postDate": "11/05/2018 08:22:40",
      "content": "<p>Yeah, deleting 513 GB will definitely take some time.</p>",
      "rawMarkdown": "Yeah, deleting 513 GB will definitely take some time.",
      "votes": null
    },
    {
      "id": "419272",
      "postDate": "11/11/2018 16:06:38",
      "content": "<p>deleting gs bucket in two steps:\n1) create a file with nano  config-json-file and the content as the below.</p>\n\n<pre><code>{\n\n\n \"rule\":\n  [\n    {\n      \"action\": {\"type\": \"Delete\"},\n      \"condition\": {\"age\": 1}\n    }\n  ]\n}\n</code></pre>\n\n<p>2) setting the lifecycle :</p>\n\n<pre><code>gsutil lifecycle set config-json-file  gs://inclusive-images_challenge\nSetting lifecycle configuration on gs://inclusive-images_challenge/...\n</code></pre>",
      "rawMarkdown": "deleting gs bucket in two steps:\n1) create a file with nano  config-json-file and the content as the below.\n\n    {\n    \n    \n     \"rule\":\n      [\n        {\n          \"action\": {\"type\": \"Delete\"},\n          \"condition\": {\"age\": 1}\n        }\n      ]\n    }\n\n2) setting the lifecycle :\n\n    gsutil lifecycle set config-json-file  gs://inclusive-images_challenge\n    Setting lifecycle configuration on gs://inclusive-images_challenge/...",
      "votes": null
    },
    {
      "id": "421173",
      "postDate": "11/14/2018 17:06:15",
      "content": "<p>Yeah, i did set a lifecycle. even then it did not get deleted. i mentioned it in my post</p>",
      "rawMarkdown": "Yeah, i did set a lifecycle. even then it did not get deleted. i mentioned it in my post",
      "votes": null
    },
    {
      "id": "422989",
      "postDate": "11/17/2018 07:37:40",
      "content": "<p>In my case that deleted just fine, but for the bucket name that I deleted 1-click</p>",
      "rawMarkdown": "In my case that deleted just fine, but for the bucket name that I deleted 1-click",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 415301,
      "author_name": "artyomp",
      "author_url": "",
      "post_date": "11/04/2018 20:57:19",
      "content": "<p>Try deleting it from the browser on GCS page.</p>",
      "votes": null,
      "replies": [
        {
          "id": 415452,
          "author_name": "kalyanrdy",
          "author_url": "",
          "post_date": "11/05/2018 06:24:22",
          "content": "<p>I did try that. since its a folder inside with many files, its taking too long after i click delete button.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 415426,
      "author_name": "avolod",
      "author_url": "",
      "post_date": "11/05/2018 05:24:47",
      "content": "<p>In my opinion, to delete a bucket will be rather instant, otherwise you may use the web interface of GCP: Click to the hamburger icon in the top left corner -&gt; Storage -&gt; your bucket.\nHowever generic sequence that you seem to use is :</p>\n\n<pre><code>gsutil rm gs://[BUCKET_NAME]/[OBJECT_NAME]\n</code></pre>\n\n<p>and to delete a bucket you may use:</p>\n\n<pre><code>gsutil rm -r gs://[BUCKET_NAME]\n</code></pre>\n\n<p><a href=\"https://cloud.google.com/storage/docs/deleting-objects\">https://cloud.google.com/storage/docs/deleting-objects</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 415453,
          "author_name": "kalyanrdy",
          "author_url": "",
          "post_date": "11/05/2018 06:26:13",
          "content": "<p>Hey Andrei, i did try your approach, its deleting the files one by one. Its taking too long for that. Also, when i try to do that in the GUI, i am not getting that popup messages which asks me for confirmation to delete bucket. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415493,
          "author_name": "avolod",
          "author_url": "",
          "post_date": "11/05/2018 08:20:16",
          "content": "<p>may be the faster delete will only be possible with using disks [ssd] or <a href=\"https://cloud.google.com/filestore/\">filestore</a>, rather than gs.\nSome references: <a href=\"https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket\">https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket</a>\n<a href=\"https://cloud.google.com/storage/docs/gsutil/commands/lifecycle\">https://cloud.google.com/storage/docs/gsutil/commands/lifecycle</a>\nif you have set the lifecycle to 1 day than objects will likely to be wiped based on that policy, in my opinion.\nYou should have used a json file with contents like the below:</p>\n\n<pre><code>{\n\n\n \"rule\":\n  [\n    {\n      \"action\": {\"type\": \"Delete\"},\n      \"condition\": {\"age\": 1}\n    }\n  ]\n}\n</code></pre>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415497,
          "author_name": "kalyanrdy",
          "author_url": "",
          "post_date": "11/05/2018 08:22:40",
          "content": "<p>Yeah, deleting 513 GB will definitely take some time.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 419272,
      "author_name": "avolod",
      "author_url": "",
      "post_date": "11/11/2018 16:06:38",
      "content": "<p>deleting gs bucket in two steps:\n1) create a file with nano  config-json-file and the content as the below.</p>\n\n<pre><code>{\n\n\n \"rule\":\n  [\n    {\n      \"action\": {\"type\": \"Delete\"},\n      \"condition\": {\"age\": 1}\n    }\n  ]\n}\n</code></pre>\n\n<p>2) setting the lifecycle :</p>\n\n<pre><code>gsutil lifecycle set config-json-file  gs://inclusive-images_challenge\nSetting lifecycle configuration on gs://inclusive-images_challenge/...\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 421173,
          "author_name": "kalyanrdy",
          "author_url": "",
          "post_date": "11/14/2018 17:06:15",
          "content": "<p>Yeah, i did set a lifecycle. even then it did not get deleted. i mentioned it in my post</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 422989,
          "author_name": "avolod",
          "author_url": "",
          "post_date": "11/17/2018 07:37:40",
          "content": "<p>In my case that deleted just fine, but for the bucket name that I deleted 1-click</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "415249": "I am trying to delete the entire dataset which i transferred  to GCP bucket. But, i am unable to . I am currently using gsutil -m rm -r gs://[Bucket Name] in the cloud shell. But, its taking too much time. I have also set Life Cycle rule to delete it after 1 day. But, nothing happened. Can anyone help me with this!",
    "415301": "Try deleting it from the browser on GCS page.",
    "415426": "In my opinion, to delete a bucket will be rather instant, otherwise you may use the web interface of GCP: Click to the hamburger icon in the top left corner -&gt; Storage -&gt; your bucket.\nHowever generic sequence that you seem to use is :\n\n    gsutil rm gs://[BUCKET_NAME]/[OBJECT_NAME]\nand to delete a bucket you may use:\n\n    gsutil rm -r gs://[BUCKET_NAME]\n\nhttps://cloud.google.com/storage/docs/deleting-objects",
    "415452": "I did try that. since its a folder inside with many files, its taking too long after i click delete button.",
    "415453": "Hey Andrei, i did try your approach, its deleting the files one by one. Its taking too long for that. Also, when i try to do that in the GUI, i am not getting that popup messages which asks me for confirmation to delete bucket.",
    "415493": "may be the faster delete will only be possible with using disks [ssd] or [filestore][1], rather than gs.\nSome references: https://stackoverflow.com/questions/29840033/fast-way-of-deleting-non-empty-google-bucket\nhttps://cloud.google.com/storage/docs/gsutil/commands/lifecycle\nif you have set the lifecycle to 1 day than objects will likely to be wiped based on that policy, in my opinion.\nYou should have used a json file with contents like the below:\n\n    {\n \n\n     \"rule\":\n      [\n        {\n          \"action\": {\"type\": \"Delete\"},\n          \"condition\": {\"age\": 1}\n        }\n      ]\n    }\n\n  [1]: https://cloud.google.com/filestore/",
    "415497": "Yeah, deleting 513 GB will definitely take some time.",
    "419272": "deleting gs bucket in two steps:\n1) create a file with nano  config-json-file and the content as the below.\n\n    {\n    \n    \n     \"rule\":\n      [\n        {\n          \"action\": {\"type\": \"Delete\"},\n          \"condition\": {\"age\": 1}\n        }\n      ]\n    }\n\n2) setting the lifecycle :\n\n    gsutil lifecycle set config-json-file  gs://inclusive-images_challenge\n    Setting lifecycle configuration on gs://inclusive-images_challenge/...",
    "421173": "Yeah, i did set a lifecycle. even then it did not get deleted. i mentioned it in my post",
    "422989": "In my case that deleted just fine, but for the bucket name that I deleted 1-click"
  },
  "source": "meta"
}