Empty Windows recycle bin with PowerShell

Written by 3:29 pm PowerShell

Empty Windows recycle bin with PowerShell

Windows has the concept of the recycle bin, from which you can restore files you have deleted. You might want to clear the Windows recycle bin from time to time, to remove unnecessary files and free up space. You can do that using the Windows user interface, or you can empty the Windows recycle bin using PowerShell. The Clear-RecycleBin is a simple PowerShell cmdlet, which removes the file from the Windows recycle bin.

Clear-RecycleBin

You can also use the -force parameter if you don’t want the prompt to confirm.

Clear-RecycleBin -Force

I hope that quick PowerShell post, helps you to empty the Windows recycle bin using PowerShell, if you have any questions feel free to leave a comment. If you want to know more about how you can install and update to PowerShell 7, check out my blog post, you can also learn what is new in PowerShell 7 right here.

Tags: , , , , , , , Last modified: January 26, 2021
Close Search Window
Close