How to Empty the Recycle Bin Using PowerShell in Windows 11
Emptying the Recycle Bin from PowerShell permanently removes deleted files to reclaim space, which is handy in cleanup scripts or when you prefer the command line. Windows 11’s PowerShell includes a YYGACOR Login command to clear the Recycle Bin directly.
The Command
Clear-RecycleBin -Force
What It Does
`Clear-RecycleBin` empties the Recycle Bin, and `-Force` skips the confirmation prompt so it runs without asking. This permanently deletes everything currently in the Recycle Bin across your drives, freeing the space those files occupied. It is the command-line equivalent of right-clicking the Recycle Bin and choosing to empty it.
When You’d Use This
This is useful for reclaiming disk space by permanently removing deleted files, especially in cleanup scripts or when you prefer the command line. When freeing storage, emptying the Recycle Bin recovers the space that deleted files still occupy, and doing it by command pairs naturally with clearing temporary files in a single maintenance routine.
Useful Variations
To empty the Recycle Bin for a specific drive only, add `-DriveLetter C`. Without `-Force`, the command asks for confirmation before deleting. To include this in a maintenance routine, it pairs well with clearing temporary files, together reclaiming space from deleted items and temporary data in one cleanup pass.
If It Doesn’t Work
Since this permanently deletes the bin’s contents with `-Force`, anything inside cannot be recovered afterward, so glance at it first if unsure. Omitting `-Force` prompts for confirmation. If you want to empty only one drive’s bin, add `-DriveLetter` with the letter. If the command reports the bin is already empty, there is simply nothing to remove, which is not an error.
Good to Know
Emptying the Recycle Bin permanently deletes its contents, so anything inside can no longer be restored afterward, making it worth a glance before running with `-Force`. This reclaims the disk space the deleted files were holding, which is why emptying the bin is a common step when freeing up storage on a drive.
Putting It Together
Once you have run it once or twice, this becomes second nature. As part of keeping Windows healthy and automating upkeep, this command is part of the maintenance routine that resolves problems and prevents them. Combined with the related service and repair commands, it gives you direct control over the background machinery that keeps the system running well. Like anything in the terminal, the real value comes from trying it on your own system and adapting the variations above to what you actually need, so it is worth experimenting with in a safe, low-stakes situation before relying on it in a script or during troubleshooting. Keeping a note of the commands you find most useful, along with the variations that fit your workflow, turns scattered one-off tricks into a personal reference you can draw on whenever a similar task comes up again.