Output of above command to delete recycle bin contents of specified drive as below PS C:\> Clear-RecycleBin -DriveLetter C It will ask for user confirmation to empty recycle bins of C Drive only. In the above script, PowerShell Clear-RecycleBin uses DriveLetter parameter to specify drive letter as C. C:\, use Clear-RecycleBin command as below Clear-RecycleBin -DriveLetter C If you want to empty recycle bin of specified drive eg. Upon Yes or yes to All consent, it will empty all recycle bin on local computer.Ĭool Tip: How to convert decimal to hex in PowerShell! PowerShell Empty Recycle Bin of Specified Drive Yes Yes to All No No to All Suspend Help (default is "Y"): y Performing the operation "Clear-RecycleBin" on target "All of the contents of the Recycle Bin".
If you want to empty recycle bin on local computer, use below command Clear-RecycleBinĪbove command in PowerShell to empty all recycle bin on local computer ask for user confirmation to delete contents of recycle bin as below PS C:\> Clear-RecycleBinĪre you sure you want to perform this action? In the above script, PowerShell Clear-RecycleBin uses Force parameter to remove contents of all recycle bin without user confirmation. You can forcefully empty all recycle bins on local computer without asking user for confirmation to delete recycle bin content using Clear-RecycleBin cmdlet as below Clear-RecycleBin -Force
5 Conclusion PowerShell Clear-RecycleBin Syntax