Welcome to the upcoming version of the MinIO Documentation! The content on this page is under active development and may change at any time. If you can't find what you're looking for, check our legacy documentation. Thank you for your patience.

mc rb

Description

The mc rb command removes a bucket and all its contents on the target S3-compatible service.

Removing a bucket with mc rb also removes any configurations associated to that bucket. To remove only the contents of a bucket, use mc rm instead.

Example

Remove a Bucket

mc rb ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.

  • Replace PATH with the path to the bucket to remove.

Syntax

rb has the following syntax:

mc rb [FLAGS] TARGET [TARGET...]
TARGET

REQUIRED

The full path to the bucket to remove. Specify TARGET as ALIAS/PATH, where:

  • ALIAS is the alias of a configured S3-compatible host, and

  • PATH is the path to the bucket.

--force

Allows running mc rb on a bucket with versioning enabled.

--dangerous

Allows running mc rb when the TARGET specifies the root (all buckets) on the S3-compatible service.