I'm trying using gsutil to remove the contents of a Cloud Storage bucket (but not the bucket itself). According to the documentation, the command should be:
gsutil rm gs://bucket/**
However, whenever I run that (with my bucket name substituted of course), I get the following response:
zsh: no matches found: gs://my-bucket/**
I've checked permissions, and I have owner permissions. Additionally, if I specify a file, which is in the bucket, directly, it is successfully deleted.
Other information which may matter:
- My bucket name has a "-" in it (similar to "my-bucket")
- It is the bucket that Cloud Storage saves my usage logs to
How do I go about deleting the contents of a bucket?
And for remove entire bucket including all objects
zsh is attempting to expand the wildcard before gsutil sees it (and is complaining that you have no local files matching that wildcard). Please try this, to prevent zsh from doing so:
Note that you need to use single (not double) quotes to prevent zsh wildcard handling.