SharePoint Online reporting

How to list deleted sites in SharePoint Online

List deleted sites that can still be restored with the SharePoint Online Management Shell, read Deleted sites in the SharePoint admin centre, or run Altivane's Deleted Sites report.

By the Published

To list deleted sites in SharePoint Online, read the Recycle Bin for sites with Get-SPODeletedSite, adding -IncludePersonalSite to include deleted OneDrives. Microsoft keeps a deleted site for 93 days and then deletes it with all its content for good, so the days left matter most. Restoring a site connected to a Microsoft 365 group restores the group too, and the group's other resources are kept for only 30 days.

Choose the method that fits the job
MethodBest fit
PowerShellA CSV of every deleted site and OneDrive, the fewest days left first.
Admin centreFinding 1 deleted site and when it was deleted, sorted by time deleted.
AltivaneRecommended for recurring reviews, with each site's days left and storage limit in a workbook.

Before you start

Use an account with the SharePoint Administrator role. For Get-SPODeletedSite, Microsoft says the account must be a SharePoint Online administrator and a site collection administrator of the deleted sites. In PowerShell 7 the SharePoint Online Management Shell must be loaded through Windows PowerShell, which the last line of the install block does.

The Recycle Bin is read live. Get-SPODeletedSite only returns properties; it doesn't restore anything. The examples read and export and change nothing.

Option 1

List deleted sites with PowerShell

Install the module once, then connect and export the deleted sites and OneDrives. The connection prompts you to sign in. Replace contoso with your tenant's name.

PowerShell
# Install once, if the module is not already installed.
Install-Module Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser
# In PowerShell 7 only: load the module through Windows PowerShell.
Import-Module Microsoft.Online.SharePoint.PowerShell -UseWindowsPowerShell
PowerShell
$ErrorActionPreference = 'Stop'
Connect-SPOService -Url 'https://contoso-admin.sharepoint.com'
try {
    $deleted = @(Get-SPODeletedSite -Limit All -IncludePersonalSite)
    if ($deleted.Count -eq 0) {
        Write-Output 'The Recycle Bin holds no deleted sites or OneDrives.'
    } else {
        $deleted | Sort-Object DaysRemaining |
            Select-Object Url, DeletionTime, DaysRemaining, Status |
            Export-Csv -Path './deleted-sites.csv' -NoTypeInformation -Encoding utf8
        Write-Output "$($deleted.Count) deleted sites written to deleted-sites.csv."
    }
} finally {
    Disconnect-SPOService
}

Without -Limit All the cmdlet stops at 200 sites. Leave out -IncludePersonalSite for SharePoint sites only, or use -IncludeOnlyPersonalSite in its place for OneDrives only; the 2 can't be used together. DaysRemaining is how long is left before SharePoint deletes the site for good, so the rows at the top are the ones to decide on first.

Check a single deleted site

Reconnect with Connect-SPOService, then read 1 deleted site by its address. The main export above disconnects when it finishes.

PowerShell
# Run while connected to SharePoint. Replace the example address.
Get-SPODeletedSite -Identity 'https://contoso.sharepoint.com/sites/research' |
    Select-Object Url, DeletionTime, DaysRemaining

Option 2

Review deleted sites in the admin centre

  1. Sign in to the SharePoint admin centre as a SharePoint Administrator.
  2. Go to Sites > Deleted sites.
  3. Sort and filter the list as you would on Active sites, and by Time deleted, to find the site you want.
  4. Leave the page without selecting Restore or deleting anything.

This suits finding 1 site that someone deleted by mistake. For a list to keep and compare from one month to the next, use PowerShell or Altivane.

Common questions

Why is a deleted site missing from the list?

After 93 days SharePoint deletes a site for good, with its lists, libraries, pages and subsites, and it leaves the Recycle Bin. A site in the Recycle Bin is also missing from Get-SPOSite, which lists active sites only.

What happens to the group when I restore a site?

Restoring a site that belongs to a Microsoft 365 group restores the group and all its resources. Microsoft keeps the group's other resources for only 30 days, against 93 for the site, so a site deleted more than 30 days ago may come back without them.

How do I find sites to clean up before deleting them?

Look at how recently each site was used before you delete it, so nothing in use goes to the Recycle Bin. See how to find inactive sites in SharePoint Online.

Microsoft references

Technical references checked on 6 November 2026. The example scripts have been reviewed and syntax checked; they have not been run against a live tenant.

Talk to us about Altivane

Questions, or pricing? Get in touch.

Contact us