mc rb
Table of Contents
The mc rb
command removes one or more buckets on MinIO or
another S3-compatible service.
To remove only the contents of a bucket, use mc rm
instead.
Important
mc rb
permanently deletes bucket(s) on the target deployment,
including any and all object versions
and bucket configurations such as
lifecycle management or
replication.
You can also use mc rb
against the local filesystem to produce
similar results to the rm --rf
commandline tool.
The following command removes the mydata
bucket on the
myminio
MinIO deployment:
mc rb --force myminio/mydata
The command has the following syntax:
mc [GLOBALFLAGS] rb \
--force \
[--dangerous] \
ALIAS [ALIAS...]
Brackets []
indicate optional parameters.
Parameters sharing a line are mutually dependent.
Parameters seperated using the pipe |
operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Required The alias of a MinIO or other S3-compatible service and the full path to the bucket to remove. For example:
mc rb --force myminio/mydata
Omit the bucket path to perform a site-wide removal of buckets on the MinIO
deployment. This operation requires specifying
--dangerous
to explicitly acknowledge the permanent
removal of all data on the deployment. For example:
mc rb --force --dangerous myminio
For removing a directory and its contents on a local filesystem, specify
the full path to that directory. The
--force
flag is ignored if specified. For example:
mc rb ~/data/myolddata
You can specify multiple ALIAS
targets consisting of either
MinIO or local filesystem directories. The command attempts to remove
all specified targets. For example:
mc rb --force myminio/mydata ~/data/myolddata
Optional Directs mc rb
to perform a site-wide removal of all
buckets on each specified ALIAS
(e.g. myminio/
).
If any ALIAS
specifies a filesystem directory, this option
results in the removal of all subdirectories and files at that directory
path similar to rm --rf
.
Warning
Running mc rb --dangerous
is irreversible. Exercise all
possible due diligence in ensuring the command applies to only the
desired ALIAS
targets prior to execution.
The path to a JSON
formatted configuration file that
mc uses for storing data. See Configuration File for
more information on how mc uses the configuration file.
Enables JSON lines formatted output to the console.
For example:
mc --JSON COMMAND
Disables TLS/SSL certificate verification. Allows TLS connectivity to servers with invalid certificates. Exercise caution when using this option against untrusted S3 hosts.
Displays the current version of mc
.
mc rb --force ALIAS/PATH
The mc commandline tool is built for compatibility with the AWS S3 API and is tested MinIO and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.
This work is licensed under a Creative Commons Attribution 4.0 International License.
©2020-Present, MinIO, Inc.