Files
doc-exports/docs/obs/tool-obsutil/obs_11_0011.html
weihongmin1 a41a4e0331 OBS Util 0115 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: weihongmin1 <weihongmin1@huawei.com>
Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
2026-02-17 10:18:57 +00:00

69 lines
5.3 KiB
HTML

<a name="obs_11_0011"></a><a name="obs_11_0011"></a>
<h1 class="topictitle1">Deleting a Bucket</h1>
<div id="body1542440101580"><div class="section" id="obs_11_0011__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0011__p11772825481">You can use this command to delete a bucket. The bucket to be deleted must be empty (containing no objects, historical versions, or fragments).</p>
<div class="note" id="obs_11_0011__note1711716215438"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_11_0011__p1611722112431">To delete a non-empty bucket, run the commands in <a href="obs_11_0020.html">Deleting a Multipart Upload Task</a> and <a href="obs_11_0021.html">Deleting an Object</a> to clear the bucket, and then run the following command to delete the bucket.</p>
</div></div>
</div>
<div class="section" id="obs_11_0011__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0011__ul244723415233"><li id="obs_11_0011__li14447534112318">In Windows<pre class="screen" id="obs_11_0011__screen14572446102313">obsutil rm obs://bucket [-f] [-config=xxx] </pre>
</li><li id="obs_11_0011__li15751935112310">In Linux or macOS<pre class="screen" id="obs_11_0011__screen172710523237">./obsutil rm obs://bucket [-f] [-config=xxx] </pre>
</li></ul>
</div>
<div class="section" id="obs_11_0011__section105489664410"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0011__ul0548196134413"><li id="obs_11_0011__li1548146114410">Take the Windows OS as an example. Run the <strong id="obs_11_0011__b1749332852013">obsutil rm obs://bucket-test</strong> command to delete bucket <strong id="obs_11_0011__b1590635151018">bucket-test</strong>.<pre class="screen" id="obs_11_0011__screen154996164419"><strong id="obs_11_0011__b954936184420">obsutil rm obs://bucket-test</strong>
Start at 2024-09-30 07:58:33.736622 +0000 UTC
Do you want to delete bucket [bucket-test] ? Please input (y/n) to confirm:
y
Delete bucket [bucket-test] successfully!</pre>
</li></ul>
</div>
<div class="section" id="obs_11_0011__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0011__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0011__row683212154419"><th align="left" class="cellrowborder" valign="top" width="16.16161616161616%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0011__p118329219446">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.28282828282828%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0011__p15137125919108">Optional or Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.55555555555556%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0011__p12832121184414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_11_0011__row108328217449"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0011__p64495172515">bucket</p>
</td>
<td class="cellrowborder" valign="top" width="28.28282828282828%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0011__p154316502519">Mandatory</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0011__p17425512259">The bucket name</p>
</td>
</tr>
<tr id="obs_11_0011__row107241436114819"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0011__p5724123684813">f</p>
</td>
<td class="cellrowborder" valign="top" width="28.28282828282828%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0011__p1272453612483">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0011__p972417362487">Runs in force mode.</p>
</td>
</tr>
<tr id="obs_11_0011__row1660212336344"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0011__p153951131317">config</p>
</td>
<td class="cellrowborder" valign="top" width="28.28282828282828%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0011__p12395135316">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0011__obs_11_0008_p1750111452317">The user-defined configuration file for executing the current command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
</td>
</tr>
<tr id="obs_11_0011__row770220073410"><td class="cellrowborder" valign="top" width="16.16161616161616%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0011__p1966666191820">payer</p>
</td>
<td class="cellrowborder" valign="top" width="28.28282828282828%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0011__p1266611611820">Optional (additional parameter)</p>
</td>
<td class="cellrowborder" valign="top" width="55.55555555555556%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0011__p1166617619181">Specifies that requester pays is enabled.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0007.html">Bucket Commands</a></div>
</div>
</div>