SharePoint Recycle Bin: A Comprehensive Guide

As a SharePoint user, you may have come across the term “Recycle Bin” on several occasions. However, do you know what the Recycle Bin is, how it works, and how to use it effectively? In this comprehensive guide, we will take a deep dive into everything you need to know about the SharePoint Recycle Bin, including how to access it, different stages, retention policy, understanding its limits, and search capabilities. We will also cover how to recover deleted items using PowerShell commands, managing site collection recycle bin, and common issues with troubleshooting tips. Whether you’re a beginner or an experienced user, this guide will provide you with a comprehensive understanding of SharePoint recycle bin management.

Introduction to the SharePoint Recycle Bin

The SharePoint Recycle Bin is a feature that allows you to recover deleted items, including documents, lists, libraries, and other content, within a certain period. The Recycle Bin is essential because it provides a safety net that prevents the accidental deletion of critical information. Similar to the Windows Recycle Bin on your desktop, SharePoint’s Recycle Bin holds deleted files, folders, lists, libraries, and even whole sites. It offers an opportunity to retrieve those deleted items, saving the day if you ever realize you’ve trashed something you didn’t mean to.

In addition, SharePoint has two layers of recycle bins, the first-stage and second-stage recycle bins. When you delete an item from a SharePoint site or Microsoft Teams, it is not permanently deleted but moved to the Recycle Bin, where you can recover it if needed. It’s important to understand the different types of recycle bins in SharePoint in order to manage them effectively.

Understanding the SharePoint Recycle Bin: First and Second Stage

SharePoint has two Recycle Bins: The First Stage (End User) Recycle Bin and the Second Stage (Site Collection) Recycle Bin. The First Stage is also known as the “End-User Recycle Bin” and is specific to each user. When you delete an item, it is moved to the First Stage, where it stays for 93 days. If the item is not restored within that time frame, it’s permanently deleted from the site collection.

The Second Stage is also known as the “Site Collection Recycle Bin” and is specific to the site collection. When an item is deleted from the First Stage, it is moved to the Second Stage, where it stays for an additional period, based on the Recycle Bin retention settings. After the retention period expires, the item is permanently deleted and cannot be recovered (Unless you have the retention policy or any 3rd party backup solutions in place!).

Recycle Bin Permissions

SharePoint Recycle Bin permissions are closely tied to user roles. Any site member with edit permissions can delete and restore their items in the First Stage Recycle Bin. Site Collection Administrators, on the other hand, have power over the Second Stage Recycle Bin and can restore items deleted by any user. Site Visitors with the Read permission level can still see the recycle bin link, but cannot access content in the Recycle Bin.

To modify the access levels for different users in the SharePoint Recycle Bin, you can adjust the permissions for the users or groups who have access to the documents or items in the Recycle Bin. Note that there is no specific setting to alter the access levels for the Recycle Bin itself. The permissions for the Recycle Bin are linked to the permissions of the documents or items within it.

Retention Period: How long are deleted files stored in the SharePoint Recycle Bin?

The total retention period of the deleted files in the SharePoint recycle bin is 93 days. In the first-stage recycle bin, deleted items are stored for 93 days. If the deleted files are not restored, then they’ll be deleted permanently after 93 days. When the files in the first-stage recycle bin are deleted by the user, then they’ll be sent to the second-stage recycle bin, and then they’ll be deleted from there when they reach their total recycle bin retention period.

In short, the total life span of deleted files is 93 days, combining first-state and second-stage. (It’s a common misconception that the deleted items stay in the first-stage recycle bin for 93 days, and then the second-stage recycle bin for 93 days!). Notably, this duration is cumulative across both stages. If an item stays in the First Stage Bin for 20 days, and then gets deleted, it’ll remain in the Second Stage Bin for the remaining 73 days.

Deleted items in SharePoint are stored in the Recycle Bin only for a specific period. The Recycle Bin retention periods depend on whether the SharePoint environment is on-premises or online:

  • SharePoint On-Premises – Deleted items remain in the first-stage Recycle Bin for 30 days by default. The second-stage retention is also 30 days by default.
  • SharePoint Online – Deleted items remain in the first-stage Recycle Bin for 93 days. The second-stage retention is 30 days.

These retention periods can be customized for SharePoint on-premises through recycle bin settings if required.

Where is the SharePoint Recycle Bin located in Microsoft 365?

You might ask: where is the Recycle Bin in SharePoint? Navigating to the SharePoint Recycle Bin is straightforward. In modern team sites, You’ll find the Recycle Bin link in the Quick Launch bar navigation at the bottom left of the screen. If you can’t find it there, it might be hidden – in this case, check the Site Contents page. To access the Recycle Bin through site contents, follow these steps:

  1. Go to the SharePoint site where the item was deleted.
  2. Click on the gear icon in the top-right corner and select “Site contents.”
    find recycle bin in sharepoint
  3. Click on the Recycle Bin icon at the top right portion of the site contents page.
    access sharepoint recyle bin

To access the SharePoint Recycle Bin, you need to have the appropriate permissions. By default, Site members with edit permission level, site owners or group owners with full control permission level, and Site Collection Administrators have access to the Recycle Bin. You can also access it from Settings >> Site Information >> View all Site Settings >> Recycle bin.

access site recycle bin in sharepoint online

Once you’ve accessed the recycle bin, you can restore deleted items or permanently delete them.

How to Access the Second-Stage Recycle Bin in SharePoint Online?

To access the second-stage recycle bin in SharePoint Online, you can follow these steps:

  1. Log in to the SharePoint site as a site collection admin.
  2. Click on the Settings gear icon and choose “Site Contents”.
  3. On the Site Contents page, click the Recycle Bin link, located in the top-right corner.
  4. Scroll down to the bottom and click on the “Second-stage” Recycle bin link.
  5. This takes you to the SharePoint site recycle bin or second-stage recycle bin.
    sharepoint second stage recycle bin

Note that the second-stage recycle bin is only accessible to site collection admins, and items deleted from the first-stage recycle bin will stay here for 93 days. If the recycle bin has already exceeded its site collection quota or the site collection admin manually deleted the files from the second-stage recycle bin, the items may be permanently removed.

In summary, to access the second-stage recycle bin in SharePoint Online, you need to log in as a site collection admin, click on the Recycle Bin link on the Site Contents page, and then the “Second-stage recycle bin” link. You can restore any deleted content from the second-stage recycle bin.

Restoring Deleted Files from the SharePoint Recycle Bin

Restoring a deleted file from the SharePoint recycle bin is a simple process. To restore deleted files from the SharePoint Online Recycle Bin, follow these steps:

  1. Access the recycle bin by following the steps outlined above.
  2. Click on the gear icon in the top-right corner and select “Site contents.”
  3. Click on the “Recycle Bin” link at the bottom of the page.
  4. Select the particular file or folder you want to restore using the checkboxes.
  5. Click on the “Restore” button.

SharePoint will then put the items back to their original location, where they were deleted from, retaining all metadata, including version histories. It’s also possible to set up alerts on specific libraries in the SharePoint Online site, So you’ll be notified when someone deletes items in it.

restore deleted files from recycle bin in sharepoint

Bulk Restore Deleted Items in the SharePoint Recycle Bin: You can restore deleted items individually or in bulk. To restore multiple items, select them using the checkboxes and click on the Restore button. You can also use PowerShell: How to Restore Deleted Files from Recycle Bin in SharePoint Online using PowerShell?

How to recover deleted files from the second-stage recycle bin?

If an item has been deleted from the first-stage recycle bin, it’s moved to the second-stage recycle bin. Follow these steps to recover deleted files from the SharePoint second-stage recycle bin:

  1. Access the site recycle bin by following the steps outlined earlier.
  2. Click on the “Second-stage recycle bin” link at the bottom of the page.
  3. Select the item that you want to recover.
  4. Click on the “Restore” button at the top of the page.

Wait for the item(s) to be restored. Depending on the item(s) size, this may take some time.

How to recover items permanently deleted from SharePoint Recycle Bin? If you don’t have a retention policy configured or 3rd party backup – data recovery solutions for SharePoint Online, then you are left with: Reaching out to Microsoft support to see if they can restore files for you! In my experience, it worked when the item(s) were deleted no more than 20 days before.

How to Remove Deleted Files Permanently in SharePoint Online?

To permanently delete a File in SharePoint Online, you can follow these steps:

  1. Log in to the SharePoint site as a site collection admin.
  2. Click on the Settings gear icon and choose “Site Contents”.
  3. On the Site Contents page, click the Recycle Bin link, located in the top-right corner.
  4. On the recycle bin page, scroll down to the bottom and click on the “Second-stage Recycle bin” link.
  5. Select the check box next to the items you want to permanently delete.
  6. Click on the “Delete” button on the command bar to delete the selected items permanently.
    permanently delete files from the SharePoint recycle bin

Note that once items are deleted from the second-stage recycle bin, they are permanently removed and cannot be restored. It is important to ensure that you want to permanently delete the items before doing so.

In summary, to permanently remove deleted files in SharePoint Online, you can use the second-stage recycle bin to delete the items permanently or use the PowerShell script to delete the files from the document library permanently.

How to Restore Deleted SharePoint Sites?

If you accidentally delete a SharePoint site collection, don’t panic. In addition to restoring deleted files, SharePoint allows you to easily restore deleted sites. Follow these steps to restore a deleted SharePoint site:

  1. Access the SharePoint admin center at https://YourDomain-admin.sharepoint.com/.
  2. Under “Sites”, Click on “Deleted sites” in the left-hand menu.
  3. Select the deleted site collection that you want to restore.
  4. Click on “Restore” at the top of the page.
    restore deleted sites in sharepoint online recycle bin

Note that deleted sites are retained in the site collection Recycle Bin for a certain period of time. If the site has been permanently deleted, either manually or automatically, it cannot be restored. It is important to have a backup of any important data before deleting a site to mitigate permanent deletion. To clear the tenant recycle bin, use: How to Empty Tenant Recycle Bin in SharePoint Online?

Emptying the SharePoint Online Recycle Bin

If you need to delete items from the recycle bin permanently, you can do so by emptying the recycle bin. However, be cautious when emptying the Recycle Bin, as this action cannot be undone. To empty the SharePoint Online Recycle Bin, follow these steps:

  1. Login to the SharePoint site with site collection administrator rights, where you want to empty the Recycle Bin.
  2. Click on the gear icon in the top-right corner and select “Site settings.”
  3. Under the “Site Collection Administration” section, Click on the “Recycle Bin” link.
  4. Click on the “Empty Recycle Bin” and then the “OK” button to confirm the action.
    empty recycle bin sharepoint

Removing the Recycle Bin from the SharePoint navigation

To remove the Recycle Bin from SharePoint navigation, activate the SharePoint Server Publishing Infrastructure feature or use CSS. These will hide the Recycle Bin from the navigation, but will still be accessible from the site contents.

To hide the Recycle Bin by activating the publishing feature, follow these steps:

  1. Open the SharePoint site for which you want to remove the Recycle Bin link.
  2. Go to Site Contents >> Site Settings.
  3. Select “Site Collection Features” from the Site Collection Administration section.
  4. Find SharePoint Server Publishing Infrastructure and click Activate to activate this setting.
  5. Return to the Home page, and you should see that the Recycle Bin option has disappeared.

Please note, that this doesn’t disable the Recycle Bin feature; it only makes it less accessible. More here: How to Hide the Recycle Bin in SharePoint Quick Launch?

How to search for files in the Recycle Bin in SharePoint?

Unfortunately, the SharePoint recycle bin doesn’t have the search functionality. Searching for a specific file from thousands of deleted items could be really hectic. You got to use the web browser’s native search feature, by scrolling down and paging. Luckily, there is a better way! To search for files in the Recycle Bin in SharePoint, you can use PowerShell! The below PnP PowerShell cmdlet gets all deleted items from the recycle bin and exports them to a CSV file.

The PnP PowerShell cmdlet Get-PnpRecycleBinItem can be used to filter the items from the Recycle Bin by delete date, delete by a particular user, and other criteria.

#Parameter
$SiteURL = "https://Crescent.sharepoint.com/sites/marketing"
 
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive

#Get Recycle bin Items and export to CSV
Get-PnPRecycleBinItem -RowLimit 500000 | Select Title, ItemType, Size, ItemState, DirName, DeletedByName, DeletedDate | Export-Csv "C:\Temp\RecycleBinItems.csv" -NoTypeInformation

You’ll get a prompt to enter your username and password. Proceed with the credentials to search all deleted items in the recycle bin. Please note, that we have specified the Row limit to limit the total number of items. More here: How to Search SharePoint Online Recycle Bin using PowerShell?

Understanding the Limits of Recycle Bin

SharePoint’s Recycle Bin feature offers an easy method for restoring accidentally deleted files or recovering lost user information. However, there are some limitations to be aware of:

  • You can’t customize the default Retention period of 93 days in SharePoint Online. So, make sure you are recovering the deleted content quickly.
  • Remember that restoring deleted items from the Recycle Bin isn’t always possible. If an item has been permanently deleted due to exceeding the retention period or being removed from the second-stage recycle bin, it cannot be restored using conventional means.
  • Always remember that deleted items in the recycle bin can fill the storage space allocated to your site collection; therefore, it’s essential to empty your SharePoint recycle bin regularly.
  • If a file cannot be restored, restoring the parent file first is recommended. Library restoration restores the contents automatically. This process is simple and easy

Best Practices

To use the SharePoint Recycle Bin effectively, consider the following best practices:

  1. Regularly review the recycle bin’s contents to ensure you’re not storing unnecessary data.
  2. Educate users on the importance of the Recycle Bin and how to use it effectively.
  3. Be cautious when emptying the Recycle Bin, as this action cannot be undone.
  4. Use PowerShell commands for managing the Recycle Bin. This method is beneficial for site collection administrators who need to restore a large number of files.
  5. In addition to the recycle bin, implement retention policies and 3rd party solutions for another layer of disaster recovery to recover permanently deleted items.

Using PowerShell to manage the SharePoint Recycle Bin

PowerShell is a powerful tool that can be used to manage the SharePoint recycle bin. While SharePoint provides a user-friendly interface to manage the Recycle Bin, PowerShell offers a more efficient and automated way to handle these tasks. Here are some PowerShell commands that can be used to manage the recycle bin:

  1. View Deleted Files: To view deleted items in the Recycle Bin, use the Get-PnPRecycleBinItem cmdlet. This command will retrieve a list of deleted items along with their details, such as item ID, title, and deletion date. You can filter the results based on specific criteria like deletion date, item type, or even the user who deleted the item. To get deleted sites, use: Get-PnPTenantRecycleBinItem
  2. Restoring Items: To restore items from the Recycle Bin, employ the Restore-PnPRecycleBinItem cmdlet. Specify the item ID or use pipelining to restore multiple items at once. This command will restore the selected items back to their original location. Similarly, use the Restore-PnPTenantRecycleBinItem to restore deleted sites. How to restore deleted items from the SharePoint Online Recycle bin using PowerShell?
  3. Empty Recycle bin -To clear deleted items from the recycle bin, use Clear-PnPRecycleBinItem cmdlet. You can also use the Clear-PnPTenantRecycleBinItem to delete the deleted site collections permanently. More here: How to Empty the Recycle Bin in SharePoint Online using PowerShell?

Here is a PowerShell example of how to use view, restore, and empty Recycle bin:

#Parameter
$SiteURL = "https://salaudeen.sharepoint.com/sites/Operations"
 
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive

#Get all deleted items
$DeletedItems = Get-PnPRecycleBinItem -RowLimit 500000
Write-host $DeletedItems.count

# Get deleted files by particular user
$DeletedByUser = $DeletedItems | Where {$_.DeletedByEmail -eq "salaudeen@Crescent.com"}

#Get the Lastest (or oldest items) 10 items deleted
$LatestDeletdItems = Get-PnPRecycleBinItem -RowLimit 500000 | 
                        Select Title, DirName, DeletedDateLocalFormatted -First 10 | 
                                Sort-Object DeletedDateLocalFormatted -Descending | 
                                        Format-table -AutoSize

Retention Policies and Compliance in SharePoint Recycle Bin

SharePoint Recycle Bin provides retention policies to assist organizations in managing their content by deleting unnecessary or outdated content automatically. Compliance features, such as eDiscovery and legal hold, are incorporated to ensure important records are conserved and readily available for auditing or legal purposes.

To set up retention policies in SharePoint Recycle Bin, you can navigate to the Security & Compliance Center, go to the Retention Policies page, and create a new policy. Retention policies assist organizations in keeping information for as long as necessary, but they also consume storage. The longer the retention period, the more storage space will be utilized in the Recycle Bin.

SharePoint Recycle Bin vs. Backup and Restore: What’s the Difference?

While the SharePoint Recycle Bin provides a safety net for deleted items, it is not a substitute for a backup and restore solution. The Recycle Bin is designed to recover deleted items within a specific period, while a backup and restore solution provides a complete backup of your SharePoint environment, allowing you to recover from a disaster or data loss. Therefore, it is essential to have a backup and restore solution in place in addition to the Recycle Bin.

How to use the OneDrive Recycle bin?

Like the SharePoint Recycle bin, OneDrive also has a built-in safety net to recover deleted files and folders. Here are some posts to help you:

Conclusion

The SharePoint Recycle Bin is a valuable feature that provides a safety net for deleted items. By understanding how the Recycle Bin works, its different stages, retention settings, and search capabilities, you can use it effectively to maximize your SharePoint experience. Remember to follow best practices, have a backup and restore solution in place, and be cautious when emptying the Recycle Bin. If you have any questions or need further assistance, consult the SharePoint documentation or contact your SharePoint administrator.

The SharePoint Recycle Bin is a powerful tool for preventing data loss, with its two-stage system and generous retention policy providing a robust safety net for your data. By understanding its features and capabilities, you can harness this tool to protect your organization’s valuable data. Happy SharePointing!

How do I find Recycle Bin in SharePoint Online?

To access the Recycle Bin in SharePoint Online, go to the site contents page and click on the Recycle Bin link located at the top-right section of the page. From there, you can view and restore any deleted items.

How long do items stay in the SharePoint Recycle Bin?

SharePoint Online keeps deleted items in the Recycle Bin for a period of 93 days. After that time, permanently deleted items cannot be recovered. However, if your organization has set up a retention policy, deleted items may be kept for a longer period of time. In SharePoint Server, default retention is 30 days – However, administrators can modify this period for SharePoint On-premises.

What happens when a SharePoint site is deleted?

When a SharePoint site is deleted, all of its contents are moved to the site’s recycle bin. If the contents are not restored within a certain timeframe, they will be permanently deleted. Any Microsoft 365 group associated with the site also be deleted. It is important to have a backup plan in place to prevent data loss in case of accidental deletion.

How do I restore a deleted folder in SharePoint?

To restore a deleted folder in SharePoint Online, go to the Site contents, click Recycle Bin, and find the folder you want to restore. Select the folder and click on the “Restore” button. The folder will be restored to its original location. If the folder is not in both stages of Recycle Bin, it may have been permanently deleted and cannot be restored.

How do you remove a recycle bin from SharePoint navigation?

To remove the Recycle Bin from SharePoint Online navigation, you need to enable the publishing feature. This can be done by going to Site Settings and clicking on Site Collection Features. Find the publishing feature and click Activate. Once this is done, the Recycle Bin will no longer appear in the navigation.
More info: How to Hide Recycle bin in SharePoint Online Left Navigation?

How to empty the SharePoint recycle bin using PowerShell?

To empty the SharePoint Online recycle bin using PowerShell, you can use the Remove-PnPRecycleBinItem cmdlet. This cmdlet allows you to remove items from the recycle bin based on various criteria, such as the date they were deleted or the type of item. You can also use the cmdlet to permanently delete all items in the recycle bin.

How do I permanently delete files from the SharePoint recycle bin?

To permanently delete files from the SharePoint Online recycle bin, you must remove the deleted files from both first-stage and second-stage recycle bins. Remember that once files are permanently deleted, they cannot be recovered. You can also use PowerShell to delete files from the SharePoint Online recycle bin permanently. Be sure to double-check which files you are deleting, as this action cannot be undone.

Can I restore an entire site collection from the SharePoint Recycle Bin?

Yes, you can restore an entire site collection from the SharePoint Recycle Bin. SharePoint Administrators can restore the deleted site collection from the SharePoint Admin center or PowerShell. More info: How to Restore a Site Collection in SharePoint Online?

What is the difference between the First-Stage and Second-Stage Recycle Bins in SharePoint?

The First-Stage Recycle Bin is accessible to users with edit permissions, while the Second-Stage Recycle Bin is only available to site collection administrators. Items are moved to the Second-Stage Recycle Bin when they are deleted from the First-Stage Recycle Bin.

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *