How To: Tips to Empty Recycle Bin from Command Line - 'cleanmgr /sagerun:1'

Recently I faced a situation where I had to empty the recycle bin from Windows command line(CMD). After doing some research (Google Search) on this topic, I found that there is no command for cleaning up recycle bin. Also recycle bin is not a folder like all other folders. I have no idea where the items in the recycle bin really get stored. Otherwise, running del command on that folder would have worked. Finally I got a solution by using cleanmgr utility.

Cleanmgr is a GUI based utility but it has two interesting options /sageset and /sagerun. Using these two options we can clean up recycle bin from command prompt. You can find the steps below.

  • First run the command 'cleanmgr /sageset:1' either from 'command prompt' or from 'Run' window.
  • Now in the Clean Manager window select Recycle bin and un-select every other category.
  • Click on OK.

Whenever you want to empty recycle bin, you can simply run the command 'cleanmgr /sagerun:1' from windows command prompt.

Comments

Popular posts from this blog

VMware PSOD Purple Screen of Death - Debugger waiting (world 2078) -- no port for remote debugger. "Escape" for local debugger

The Windows Time Service terminated with the following error - Event ID 7023 & 46

IBM x3650 M4 Series Server Model - Activation Keys Backup to be taken for IMM Moduel II, why?