Empty the Recycle Bin with Clear-RecycleBin

Purge deleted files from the Recycle Bin in one PowerShell command, with optional per-drive scoping.

Windowscleanuprecycle-binpowershellMedium risk
Run Clear-RecycleBin -Force to empty all recycle bins without a confirmation prompt, or add -DriveLetter C to limit it to one drive.

01Command

Command
$ Clear-RecycleBin -Force

02What it does

Clear-RecycleBin (built into PowerShell 5.0+) does what right-clicking the bin does, but works when the desktop icon is broken, in scripts, and in scheduled cleanup tasks. Without -Force it asks for confirmation, which is actually useful when you type it interactively; -DriveLetter scopes the purge to one volume's $Recycle.Bin folder since each drive keeps its own. Files removed this way are gone for good — there is no undo, unlike files still sitting in the bin. For a softer alternative that frees space without deleting, use the Storage Sense settings or cleanmgr instead.

03Risk

RiskMedium risk
!Warning: This permanently deletes everything in the bin — including files other user accounts deleted. There is no undo.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Clear-RecycleBin
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents Clear-RecycleBin with -DriveLetter scoping and the -Force switch to skip confirmation.

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions