-2

I have the following 2 folders in my google cloud console that I want to delete:

enter image description here

I tried rm LayoutLMv2 doesn't work; I tried gsutil rm LayoutLMv2, doesn't work either.

Then I found this where they say I need to enter the bucket info. Well, where do I find it? Googled about it, went through the documentation, navigated to the Buckets section in Gcloud console, it had only 1 bucket, kept navigating inside, but then I can't find the above 2 folders anywhere, and instead I find this gibberish:

enter image description here

I just need to do the simplest thing, and it seems its been obfuscated into oblivion.

Puteri
  • 3,348
  • 4
  • 12
  • 27
Kristada673
  • 3,512
  • 6
  • 39
  • 93

2 Answers2

0

did you define the path of the bucket because rm LayoutMv2 alone wouldn't work, for example...

  1. If I wanted to remove everything within a bucket I would do gsutil rm -r gs://bucket
  2. So, if you need to remove a file within the bucket you would do gsutil rm -r gs://bucket/subdir/(specific file here)

pretty much make sure you have the right file path after gsutil rm gs (filepath here)

  • No, I am just starting out with Gcloud since yesterday and all I literally did was git clone these 2 repos, and explored around a bit trying to dockerize them and deploy them in a Kubernetes cluster. Now that my experimentation is done, I want to delete the folders. I did not create any bucket anywhere, so I wouldn't know if they are getting created in the backend. – Kristada673 Oct 14 '22 at 19:34
  • Maybe check https://source.cloud.google.com/repos, go to settings then see if theres a delete this repository. – Matthew Segura Oct 14 '22 at 19:38
  • But why is deleting a folder such a complex task in Gcloud? Surely that can't be the case, right? – Kristada673 Oct 14 '22 at 19:39
  • so gsutil -m rm gs:// should just remove folders, not sure why it's not working on your end though – Matthew Segura Oct 14 '22 at 19:41
0

Don't confuse things. The first screenshot is for the Cloud Shell and you want to delete two folders there.

The other is for Cloud Storage that has nothing to do with your inquiry nor gsutil.

Also the Google Cloud Console is the UI for GCP, not the Shell.

You cannot delete folders because to delete a folder in Cloud Shell is like you would do in any Linux distribution. The right command is:

rm -r FOLDER_NAME

This is not an issue with GCP but basic linux commands. I'd suggest to start with that.

I know you're starting to use GCP, but always read the documentation first and understand what you're using.

Puteri
  • 3,348
  • 4
  • 12
  • 27