Empty Windows recycle bin with PowerShell

1–2 minutes
No comments on Empty Windows recycle bin with 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.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.