Skip to main content

spo site recyclebinitem clear

Permanently removes all items in a site recycle bin

Usage

m365 spo site recyclebinitem clear [options]

Options

-u, --siteUrl <siteUrl>

URL of the site where the recycle bin is located.

--secondary

Remove all items from the second-stage recycle bin. When not specified, items from the first-stage recycle bin will be cleared.

-f, --force

Don't prompt for confirmation.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

warning

Items in the recycle bin will be permanently removed without the ability to restore them.

Examples

Clear all items from the first-stage recycle bin

m365 spo site recyclebinitem clear --siteUrl https://contoso.sharepoint.com/sites/sales

Clear all items from the second-stage recycle bin

m365 spo site recyclebinitem clear --siteUrl https://contoso.sharepoint.com/sites/sales --secondary

Response

The command won't return a response on success.

CTRL + M