Empty Recycle Bin automatically in Windows 10

Windows has a special location called Recycle Bin where deleted files and folders are stored temporarily, so the user has a choice to restore accidentally deleted stuff or remove it permanently. In this article, we will see how to automate the Recycle Bin cleanup process in Windows 10.

Windows 10 recycle bin logo banner In Windows 10, there is a special PowerShell cmdlet that serves to empty the Recycle Bin properly. If you create a shortcut which executes this PowerShell cmdlet, you will be able to clean the Recycle Bin every time you start your PC or on a schedule.

Here is how it can be done.

  1. Press Win + R shortcut keys together on the keyboard to open the Run dialog. Type or copy-paste the following in the Run box:
    shell:Startup

    Shell startup in the run box The text above is a special shell command which makes File Explorer open the Startup folder directly. Windows 10 startup folder opened

  2. Right click here to create a new shorcut. Type the following in the Target text box:
    cmd.exe /c "echo Y|PowerShell.exe -NoProfile -Command Clear-RecycleBin"

    See the following screenshot: clear recycle bin on startup command

  3. Name your shortcut as "Empty Recycle Bin" and specify an icon if you want. clear recycle bin on startup shortcut name

After doing the steps above, you can reboot your PC and open your Recycle Bin folder. It will be empty.

Behind this trick is a new cmdlet Clear-RecycleBin which clears the Recycle Bin content. Combined with the "echo Y" console command, it is getting auto confirmation.

Instead of emptying the Recycle Bin automatically every time your start Windows 10, you might want to schedule the appropriate task in Task Scheduler.

  1. Open Control Panel.
  2. Go to Control Panel \ System and Security \ Administrative Tools.
  3. In the newly opened window, double-click the shortcut "Task Scheduler": Windows 10 administrative tools
  4. In the left pane, click the item "Task Scheduler Library": Windows 10 Task Scheduler Library
  5. In the right pane, click on the link "Create task": Windows 10 Create Task link
  6. A new window titled "Create Task" will be opened. On the "General" tab, specify the name of the task. Pick an easily recognizable name like "Empty Recycle Bin". You can also fill in the description if you want. create empty recycle bin task
  7. Under "Configure for", select "Windows 10": configure for windows 10
  8. Switch to the "Triggers" tab. There, click the "New..." button.
    Define here the desired time to empty the Recycle Bin. new schedule
  9. Now, switch to the Actions tab. Add a new action by clicking the "New... button".
    In Program/script, type the following:

    cmd.exe

    In the box "Add arguments (optional)", type or copy-paste the following text:

    /c "echo Y|PowerShell.exe -NoProfile -Command Clear-RecycleBin"

empty recycle bin task in Windows 10empty recycle bin task in Windows 10 - 2 You are done.

Update: Starting with build 15014, a new option appeared in Settings. Open Settings and go to System -> Storage. There, you will find the option named "Storage Sense". Enable it and you are done. Clear Temporary Files Automatically In Windows 10

Files stored in Recycle Bin for more than 30 days will be deleted for example as part of this cleanup.

The user can customize this behavior. To do this, click the link "Change how we free up space" under the switch.

Change How We Free Up Space

The related page will be opened: Change How We Free Up Space Page That's it.

7 thoughts on “Empty Recycle Bin automatically in Windows 10

  1. Alicia

    i have tried copied and paste!
    latest version of windows 10 insider is not working

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Sergey Tkachenko Post author

      I wrote this article under the latest version.
      Mind to show the error output?

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  2. Anonymouse

    Clear-RecycleBin -Confirm:0

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Sergey Tkachenko Post author

      Does not work in my Anniversary Update.
      I tried it.
      That’s why I used that trick.

      Like or Dislike: Thumb up 0 Thumb down 0

      Reply
  3. Jan

    Windows 10 How do I find Recycle bin to restore deleted files that I deleted by accident?

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply
    1. Sergey Tkachenko Post author

      Press Win + E on the keyboard. This will open Explorer.
      Press Alt + Up – it will lead you to the Desktop folder. There you will find the Recycle bin icon even it is not displayed on Desktop.

      Like or Dislike: Thumb up 1 Thumb down 0

      Reply
  4. Alicia

    tried again and it’s working!

    Like or Dislike: Thumb up 0 Thumb down 0

    Reply

Leave a Reply

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