top of page

Empty Windows recycle bin with PowerShell and Command Prompt

Updated: Mar 14, 2023

Windows Recycle bin stores deleted items like files, documents, images and more. When you delete the files its not permanently deleted from the computer. Because if you have deleted the image by mistake you can still recover it. But its important to empty the recycle bin because it takes some space to store that images.

You can easily empty the recycle bin. Click on recycle bin and click empty. So simple. You can also empty the recycle bin using powershell and Command prompt. However to empty recycle bin on local or remote computer, you will need PowerShell script to easy your task.

Empty Recycle Bin using PowerShell

STEP 1: Open PowerShell. Type Clear-RecycleBin and Hit Enter.

STEP 2: Before deleting the files, confirmation message will appear.

STEP 3: If you type "Y" then it will delete all the files from cycle bin.

STEP 4: And also if you don't want to delete or need some help then you can type "n" for no and "?" for help.

Empty Recycle Bin using Command Prompt

STEP 1: Open Command Prompt and Type "rd /s %systemdrive%\$Recycle.bin. "

STEP 2: After typing the command hit enter.

STEP 3: Type yes to delete the files.

Although it will show message that ‘Access is denied’ but nothing to worry, your recycle bin has been cleared successfully. You can cross check by double clicking on Recycle Bin.

The Tech Platform


bottom of page