• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. User Guide (S3cmd)
  4. Operation Guide
  5. Object Management
  6. Deleting an Object

Deleting an Object

You can delete your objects stored on OBS, including files and folders. Deleted objects cannot be restored.

Procedure

  1. Open the command line tool.
  2. Run the following command to delete an object in a specific bucket:

    s3cmd del s3://my-bucket/object

    or

    s3cmd rm s3://my-bucket/object

    NOTE:

    my-bucket is the bucket where the object resides. object is the name of the object. The object can be a file or folder. If the object that you want to delete is a folder, use parameter --recursive in the command.

    If delete is displayed in the command output, it indicates that this object is successfully deleted:
    delete: 's3://my-bucket/object'

  3. (Optional) Run the following command to check whether the object in the bucket is successfully deleted:

    s3cmd ls s3://my-bucket