How to Automatically Empty the SharePoint Recycle Bin Every Night
Question details
The user wants to schedule SharePoint to automatically empty a site's Recycle Bin every night at 11:55 PM.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Setting up a daily scheduled task to clear deleted files and manage SharePoint site storage capacity automatically.
- Observed behavior
- Currently, items remain in the recycle bin for the default retention period unless manually cleared, requiring an automated configuration.
Ensure you have Site Collection Administrator permissions and an active Microsoft Power Automate license to create and execute scheduled cloud flows.
Create a Scheduled Flow in Power Automate
Use Microsoft Power Automate to set up a recurring HTTP request that triggers every night to empty the SharePoint recycle bin.
Since SharePoint does not feature a built-in interface to schedule daily recycle bin clearing at an exact time, a Power Automate flow is the recommended standard method. You will need to utilize a SharePoint HTTP request within the scheduled flow to command the site to clear the recycle bin.
Log into Power Automate, click on 'Create' in the left navigation menu, and select 'Scheduled cloud flow'.
Name your flow, set the starting date, and configure it to repeat every '1 Day'. Set the specific execution time to '11:55 PM' (or your preferred time), then click 'Create'.
Click 'New step', search for 'SharePoint', and select the 'Send an HTTP request to SharePoint' action.
Select your Site Address from the dropdown. Set the Method to 'POST'. In the Uri field, enter exactly: _api/web/RecycleBin/deleteAll()
Save your flow and run a manual test. Verify in your SharePoint site that the recycle bin has been successfully emptied.

Try WPS Office for Seamless Document Management
While SharePoint and Power Automate handle complex server-side automations, WPS Office provides a free, lightweight, and highly compatible alternative for creating, editing, and managing your daily office documents locally and in the cloud.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
- 2. Install the Software: Run the downloaded installer and follow the quick on-screen instructions to set up WPS Office.
- 3. Open Your Documents: Launch WPS Office and instantly open your Word, Excel, or PowerPoint files without formatting loss.

Frequently Asked Questions
Does SharePoint automatically empty the recycle bin on its own?
Yes, by default, SharePoint automatically deletes items in the site recycle bin after 93 days. However, it does not do this nightly at a specific time unless you configure a custom script or Power Automate flow.
Can I manually empty the SharePoint recycle bin without Power Automate?
Yes, you can manually empty it by navigating to your SharePoint Site contents, clicking on the Recycle bin, and selecting the 'Empty recycle bin' option from the top command bar.
Why am I getting an Access Denied error in Power Automate when clearing the recycle bin?
The 'Send an HTTP request to SharePoint' action runs under the permissions of the user who authenticated the connection. If you get an Access Denied error, ensure your account has Site Collection Administrator privileges for that specific SharePoint site.




