evroc storage bucket delete

Delete a bucket or objects within it

Synopsis

Delete a bucket or objects within it.

If object versioning is enabled on the bucket, then deleted objects still remain, but with a deletion marker on them.

To delete a bucket, the bucket needs to be completely empty. If the bucket is not empty the "--purge" flag can be used to force the deletion of the bucket together with its content. However, the "--purge" flag is ignored if object locking is enabled on the bucket. Additionally, if the bucket has object versioning enabled (either explicitly, or implicitly by having object locking enabled), then all deletion markers and object versions must be deleted prior to deleting the bucket itself.

If the bucket is marked for deletion without being empty, it will get into a "pending deletion" state where it can no longer be updated. The bucket will then stay in that state until it has been completely emptied, after which the bucket will disappear.

evroc storage bucket delete [flags]

Examples


# Explicitly delete an empty bucket by the bucket id
evroc storage bucket delete my-bucket

# Explicitly delete a non-empty bucket by the bucket id and purge all contents
evroc storage bucket delete my-bucket --purge

# Explicitly delete an object by path
evroc storage bucket delete bucket://my-bucket/example.txt

# Delete all objects from a bucket but don't delete the bucket itself
evroc storage bucket delete bucket://my-bucket/*

Options

      --force                   Skips interactive prompts and executes destructive actions.
  -h, --help                    help for delete
      --purge                   Purge all objects in the bucket before deleting the bucket
      --s3-credentials string   Path to the S3 credentials file (default "~/.evroc/credentials.ini")

Options inherited from parent commands

      --config string   Path to the evroc config file (default "~/.evroc/config.yaml")

SEE ALSO