Stay organized with collections Save and categorize content based on your preferences.
gcloud storage rm
[URLS
…] [--additional-headers
=HEADER
=VALUE
] [--all-versions
, -a
] [--continue-on-error
, -c
] [--exclude-managed-folders
] [--read-paths-from-stdin
, -I
] [--recursive
, -R
, -r
] [--if-generation-match
=GENERATION
--if-metageneration-match
=METAGENERATION
] [GCLOUD_WIDE_FLAG …
]
my-object
from the bucket my-bucket
:
gcloud storage rm gs://my-bucket/my-object
The following command deletes all objects directly within the directory
but no objects within subdirectories:my-dir
gcloud storage rm gs://my-bucket/my-dir/*
The following command deletes all objects and subdirectories within the directory
:my-dir
gcloud storage rm gs://my-bucket/my-dir/**
Note that for buckets that contain versioned objects, the above command only affects live versions. Use the --recursive
flag instead to delete all versions.
The following command deletes all versions of all resources in
and then deletes the bucket.my-bucket
gcloud storage rm --recursive gs://my-bucket/
The following command deletes all text files in the top-level of
, but not text files in subdirectories:my-bucket
gcloud storage rm -recursive gs://my-bucket/*.txt
The following command deletes one wildcard expression per line passed in by stdin:
some_program | gcloud storage rm -I
URLS
…]
header1=value1,header2=value2
. Overrides the default storage/additional_headers
property value for this command invocation.
--all-versions
, -a
--continue-on-error
, -c
--exclude-managed-folders
--read-paths-from-stdin
, -I
--recursive
, -R
, -r
gs://bucket
, the bucket is also deleted. This option implies the --all-versions
option. If you want to delete only live object versions, use the ``**´´ wildcard instead.
--if-generation-match
=GENERATION
--if-metageneration-match
=METAGENERATION
--access-token-file
, --account
, --billing-project
, --configuration
, --flags-file
, --flatten
, --format
, --help
, --impersonate-service-account
, --log-http
, --project
, --quiet
, --trace-token
, --user-output-enabled
, --verbosity
.
Run $ gcloud help
for details.
gcloud alpha storage rm
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-20 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5