When we are talking for commands to clean $RECYCLE BIN Directory our focus is not on Recycle Bin that everyone has on desktop. $RECYCLE.BIN Directory is a hidden folder where the Recycle Bin stores the files and folders you’ve deleted. Everyone need to delete or clean those hidden $RECYCLE.BIN directories on a servers or computers to free up some space. Please beware that you can find this type of $RECYCLE BIN in all partition of your system. The solutions are tested on Windows 7, 10 and Windows Server 2012 R2.
How to clean $recycle bin
To find this $RECYCLE.BIN folder first you need to un-hide it. Select the drive (ex: c) and go to View – Options – Change folder and search options – View Tab – Select Show hidden files, folders and drivers – un-check Hide protected operating system files. Click Apply and $RECYCLE.BIN will appear on C: drive.
To perform a manual clean $RECYCLE BIN, just enter inside of folder select all and delete.
Another way to find folder option is: Control Panel – File Explorer Option – And the rest is the same like above.
To revert back the options you need to repeat the steps above, select Hide hidden files, folders and drivers and check Hide protected operating system files.
Clean $RECYCLE BIN Directory from command line:
Clean $RECYCLE.BIN from system drive:
- Open command prompt by going to Start – Search “CMD” – Open as administrator
- Run the following command – rd /s /q %systemdrive%\$RECYCLE.BIN
This procedure clears out the $Recycle.bin directory from the system partition. You can do this for each hard disk partition in your system like below.
Clean $RECYCLE.BIN from other drives:
- Open command prompt as administrator
- Run the following command – rd /s /q d:\$RECYCLE.BIN
Note! The cmd command will delete the folder $Recycle.bin permanently.
Clean $RECYCLE.BIN on all users:
- Open Command prompt as Administrator
- Run the command:
for /D %%D in (“C:\*”) do rd /Q /S “%%D\$recycle.bin” 2>nul
The command will check and delete on all users the folder $Recycle.bin. You can use this command also ON SCCM task to delete this folder over the network.
If you have any question, please feel free to ask.