SharePoint Document Issues

How to Automatically Empty the SharePoint Recycle Bin Every Night

Khadija KhanKhadija Khan Oct 10, 2026 868 views

Question details

The user wants to schedule SharePoint to automatically empty a site's Recycle Bin every night at 11:55 PM.

How to Automatically Empty the SharePoint Recycle Bin Every Night
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.
Before you start

Ensure you have Site Collection Administrator permissions and an active Microsoft Power Automate license to create and execute scheduled cloud flows.

Solution 1Recommended

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.

1
Create a Scheduled Cloud Flow

Log into Power Automate, click on 'Create' in the left navigation menu, and select 'Scheduled cloud flow'.

2
Configure the Schedule

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'.

3
Add a SharePoint HTTP Request Action

Click 'New step', search for 'SharePoint', and select the 'Send an HTTP request to SharePoint' action.

4
Configure the API Request

Select your Site Address from the dropdown. Set the Method to 'POST'. In the Uri field, enter exactly: _api/web/RecycleBin/deleteAll()

5
Save and Test

Save your flow and run a manual test. Verify in your SharePoint site that the recycle bin has been successfully emptied.

Create a Scheduled Flow in Power Automate
Advanced API Configuration: If you encounter permission errors or require more complex retention configurations, post your specific scenario in the Power Automate Community forums for specialized guidance.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Software: Run the downloaded installer and follow the quick on-screen instructions to set up WPS Office.
  3. 3. Open Your Documents: Launch WPS Office and instantly open your Word, Excel, or PowerPoint files without formatting loss.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx).Lightweight design ensures fast loading and smooth editing for large files.Familiar user interface requires no learning curve for Microsoft Office users.Built-in PDF toolkit for seamless document conversion and annotation.
microsoft office alternative - wps office

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.