Knowledge Base →4 min readUpdated: 2026-09-21

How to Empty the Recycle Bin from the Command Line

The command line empties the Recycle Bin in one line, no clicking through Explorer: PowerShell's Clear-RecycleBin clears all drives at once, while rd /s /q C:\$Recycle.Bin wipes the hidden bin folder of a specific drive. The catch: there is no confirmation and no undo — files deleted this way are gone for good, exactly as if you had emptied the bin from the desktop.

What the Recycle Bin actually is on disk

Every drive has its own hidden system folder named $Recycle.Bin, and inside it Windows keeps a subfolder per user account, named by security identifier (SID). When you “delete” a file in Explorer, it merely moves into that folder — renamed, but fully intact — which is why the bin can be emptied and restored per user. This is also why C:\$Recycle.Bin can quietly hold gigabytes that Explorer's folder view never shows.

The practical consequence for the command line: emptying the bin means deleting the contents of these hidden folders. Windows ships a proper cmdlet for exactly that job, plus the blunt rd route inherited from the MS-DOS era. Both are permanent — nothing deleted this way lands in the bin a second time.

The two commands that empty the bin

PowerShell is the clean way. The Clear-RecycleBin cmdlet ships with Windows 10 and 11 and empties the current user's bin: run it without arguments and it clears every drive, after a confirmation prompt that -Force skips. The cmd.exe route is older and blunter — rd /s /q removes the $Recycle.Bin folder itself, which Windows then recreates empty. Because it touches a protected system folder, it must run elevated, and it hits every user's bin on that drive, not just yours.

  • Clear-RecycleBin — empties the bin on all drives for the current user (asks first)
  • Clear-RecycleBin -Force — the same without the confirmation prompt, the standard form for scripts
  • Clear-RecycleBin -DriveLetter C — limits the cleanup to a single drive
  • rd /s /q C:\$Recycle.Bin — cmd.exe with admin rights: wipes the bin of drive C for every user
  • rd /s /q D:\$Recycle.Bin — repeat per drive letter; removable drives have their own bins too

Scheduling automatic emptying

The command line earns its keep in automation. In Task Scheduler, create a task that runs powershell.exe with the arguments -NoProfile -Command "Clear-RecycleBin -Force" — weekly is a sensible default, and the bin then never grows beyond a week of deletions. The GUI alternative is Storage Sense: Settings → System → Storage → Storage Sense, where the rule “Delete files in my recycle bin if they have been there for over” can be set to 1, 14 or 30 days, and 60 on Windows 11.

A scheduled wipe is a double-edged sword: anyone who uses the bin as a safety net — undeleting last week's file “just in case” — should keep the interval generous or skip automation entirely. There is nothing wrong with a big bin on a roomy drive; it only matters when space runs short. Kleaner PRO takes a middle path in its scheduled cleaning: the Recycle Bin is its own category with its own toggle, so you decide exactly what a weekly pass may and may not touch.

Questions and Answers

Is there a command to empty the Recycle Bin in cmd?

cmd.exe has no dedicated command for it. The working routes are PowerShell's Clear-RecycleBin, or rd /s /q C:\$Recycle.Bin, which deletes the hidden bin folder (requires admin rights).

Does rd /s /q C:\$Recycle.Bin delete files permanently?

Yes. It removes the bin's contents for every user on that drive with no confirmation and no undo — treat it exactly like emptying the bin from the desktop, just without the dialog.

Can I empty the Recycle Bin for all users at once?

Yes, per drive: an elevated rd /s /q X:\$Recycle.Bin clears every user's bin on drive X, because the single $Recycle.Bin folder holds all their subfolders. Clear-RecycleBin, by contrast, only touches the current user.

Know what is included before you buy.

The one-time 30-minute trial covers core tools. PRO-labelled features stay locked until a paid license is activated.

Read next

All articles · FAQ

Write to us: [email protected]