You can delete folders in a bucket by using the OSS console. When you delete the folder, the folder is deleted along with its objects.

Usage notes

  • To prevent objects from being accidentally deleted, ensure that required objects in a folder are backed up before you delete the folder.
  • If a folder contains a large number of objects, it takes a lot of time to delete objects. We recommend that you configure lifecycle rules to delete the folder. For more information, see Configure lifecycle rules.

Procedure

To delete a folder, perform the following steps:

  1. Log on to the OSS console.
  2. Click Buckets, and then click the name of the target bucket.
  3. Click the Files tab. Delete the specified folder.
    • Buckets in the unversioned state

      Click Completely Delete in the Actions column. In the message, click OK.

      The folder is completely deleted.

    • Buckets in the versioned state
      • Convert a folder to previous versions
        1. In the upper-right corner, set Display Previous Versions to Hide.
        2. Click Delete in the Actions column corresponding to the folder you want to delete. In the massage, click OK.

          The folder becomes a previous version. You can recover the folder. For more information about how to recover previous versions of a folder, see Recover previous versions.

      • Completely delete a folder
        1. In the upper-right corner, setDisplay Previous Versions to Show.
        2. Click Completely Delete in the Actions column corresponding to the folder you want to delete. In the massage, click OK.

          The folder is completely deleted.

      For more information about versioning, see Overview.

  4. In the Task List pane, you can view the deletion progress.
    When OSS performs deletion tasks, you can perform the following operations:
    • Click Removed to remove the completed tasks from Task List.
    • Click Pause All to pause the running tasks. When tasks are paused, you can perform the following operations:
      • Click Start to restart the task.
      • Click Remove to remove the task. After tasks are removed, objects that are not deleted are retained.
    • Click Start All to start all paused tasks.
    Notice Do not refresh or close the Task List pane when you delete folders. Otherwise, tasks are interrupted.