spo site classic remove¶
Removes the specified site
spo site classic remove [options]
||output usage information|
||URL of the site to remove|
||Set to directly remove the site without moving it to the Recycle Bin|
||Set to remove the site from the Recycle Bin|
||Wait for the site to be removed before completing the command|
||Don't prompt for confirming removing the site|
||Runs command with verbose logging|
||Runs command with debug logging|
Before using this command, log in to a SharePoint Online tenant admin site, using the spo login command.
To remove a classic site, you have to first log in to a tenant admin site using the spo login command, eg.
spo login https://contoso-admin.sharepoint.com.
Deleting and creating classic site collections is by default asynchronous and depending on the current state of Office 365, might take up to few minutes. If you're building a script with steps that require the site to be fully deleted, you should use the
--wait flag. When using this flag, the
spo site classic remove command will keep running until it received confirmation from Office 365 that the site has been fully deleted.
Remove the specified site and place it in the Recycle Bin
spo site classic remove --url https://contoso.sharepoint.com/sites/demosite
Remove the site without moving it to the Recycle Bin
spo site classic remove --url https://contoso.sharepoint.com/sites/demosite --skipRecycleBin
Remove the previously deleted site from the Recycle Bin
spo site classic remove --url https://contoso.sharepoint.com/sites/demosite --fromRecycleBin
Remove the site without moving it to the Recycle Bin and wait for completion
spo site classic remove --url https://contoso.sharepoint.com/sites/demosite --wait --skipRecycleBin