Disk Cleanup : Extended

How to Use Extended Disk Cleanup in Vista, Windows 7, and Windows 8

This will show you how to access and run the Extended Disk Cleanup function in Windows, allowing you to clean up more HDD space for you to use.

   Note

This must be done in an elevated command window to complete.



Let's get started!

1) In the Windows 7 start menu search box type "cmd" (without the quotes) right click the entry and select "Run As Administrator" then enter your user credentials for the UAC prompt and click yes to open the command window.
cmd runas.jpg
cmd UAC.jpg
2) In the command window that opens type the command below and hit enter.

Be advised: the command window must be left open while the cleanup is carried out.

Code:
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

cmd text.jpg


3) Now you will see the Disk Cleanup Settings window with more options available to you, select the ones you want to clean up then click ok; wait for the search and then the cleanup and then you're done.
disk cleanup.jpg
Checking.jpg
cleaning.jpg
To add a shortcut to the desktop.

   Note

This .bat file was created by CarlTR6 credit for this goes to him!


1) In the Windows start menu search box type "notepad" (without the quotes) right click the entry and choose Run as Administrator then enter your user credentials in the UAC prompt and click yes to open notepad.
Notepad Runas.jpg
UAC Notepad.jpg
2) In notepad type the code below then in the upper left of notepad at File select "Save as" name the file anything you want but it must have the .bat extension then browse to C:/Windows/System32 and click Save, then back at "File" click "Exit" to close notepad.
Code:
 cd C:\windows\system32 
%SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535
Carl's.jpg
Carl's1.jpg
Carl's2.jpg
3) Now click an empty spot on the desktop and click, "New, Shortcut" in the "Create Shortcut" window browse to C:\Windows\System32\<your file name.bat> and click ok, then in the next window click next, then for the last "Choose Name" window name the shortcut whatever you want (I chose something clever, "Clean") then click "Finish" to add the shortcut to the desktop, you're done.
Carl's6.jpg
Carl's7.jpg
Carl's8.jpg
Name.jpg
Clean.jpg
Enjoy! :)



 
Last edited by a moderator:
Pcfan,

Did you get any type of error message or anything after you pasted the command from step 2 into the command prompt and pressed enter, or is it some other part that is not working?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Shawn got it working now>but now I have to press enter as you said>before use to pop-out just after the code was pasted by himself>but is working now men Thank you Guys for your help and fast responses.
 

My Computer

OS
windows 7 ultimate

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
I just ran cleanmgr /? at the command prompt and got this dialog box:

USAGE
cleanmgr [/SAGESET:n | /SAGERUN:n | TUNEUP:n | /LOWDISK | /VERYLOWDISK | /SETUP]

MS documentation is available for the SAGESET and SAGERUN switches but what about the other 3 switches?
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
Shawn got it working now>but now I have to press enter as you said>before use to pop-out just after the code was pasted by himself>but is working now men Thank you Guys for your help and fast responses.

That's great news Pcfan. I'm happy to hear that it's working for you now. Glad we could help. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Hello pcfan, glad you found a solution and thanks for the update.
 

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Hi guys, I have just tried what you have suggested and I am still recieving the loss of memory issue in my C drive. Is there anything else you could suggest that could help me please ?

Thanks in advance.
 

My Computer

OS
Windows 7
Loss of Memory, or Disk space .. big difference... ;)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
LENOVO K450 @3.0GHZ
OS
64-bit Windows 8.1 Pro
CPU
Core(TM) i5 CPU 4330 Haswell @ 3.20GHz
Motherboard
LENOVO
Memory
12.00 GB
Graphics Card(s)
Intel(R) HD Graphics
Sound Card
Intel HD integtrated
Monitor(s) Displays
HP 25' ISP Monitor
Screen Resolution
1900/1020
Hard Drives
(1) ST1000DM003-1CH162 (2) Generic STORAGE DEVICE USB Device (3) Generic STORAGE DEVICE USB Device
Internet Speed
100mb down/10mb up
Disk Cleanup

I simply pasted the line into Target Window
Click Start
Type Disk in search box the Right click properties
then paste text into target
hit compatibilty tab
then tick run as Admin
Apply

My Bad ,cant tick run as Admin,sorry
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 X64 Bit
CPU
Intel(R) Core(TM)i7-4771 CPU @ 3.50GH
Motherboard
Asus Sabertooth Z87
Memory
Corsair 4x8 Vengeance (32GB)
Graphics Card(s)
NVIDIA GeForce GTX780
Monitor(s) Displays
LG
Screen Resolution
1920x1080
PSU
Corsair CX750
Case
Corsair 200 series
Cooling
H80i Liquid Cooler
Keyboard
Microsoft
Mouse
Microsoft
Internet Speed
good times-500-850 kbs bad times-50-100 kbs
I still have 640MB of SP1 files after intalling my slipstreamed W7SP1.
I ran your command but it still shows in the regular clean up tool.
 

Attachments

  • Win 7 RTM103.png
    Win 7 RTM103.png
    30.3 KB · Views: 1,239

My Computer

Computer Manufacturer/Model Number
ME!
OS
Windows 7 SP1 Ultimate 64bit
CPU
AMD Phenom II X4 940
Motherboard
ASUS M4A79 Deluxe (BIOS 3603)
Memory
OCZ PC8500 Platinum 4GB
Graphics Card(s)
Sapphire HD4870 1GB 256-bit GDDR5
Sound Card
HT Omega Claro
Monitor(s) Displays
ViewSonic G220fb still rocks
Screen Resolution
1600x1200@85hz
Hard Drives
160GB Seagate 7200.10 Sata
150GB WD Raptor 10,000rpm Sata
PSU
Corsair TX950W
Cooling
Zalman 9700NT
Keyboard
Logitech Standard
Mouse
Microsoft SideWinder
Internet Speed
5.26MB down 0.86MB up
Other Info
APC BackUps 900VA

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
no way hozay?
Can I delete the folder?

BTW this sp is a joke
 

My Computer

Computer Manufacturer/Model Number
ME!
OS
Windows 7 SP1 Ultimate 64bit
CPU
AMD Phenom II X4 940
Motherboard
ASUS M4A79 Deluxe (BIOS 3603)
Memory
OCZ PC8500 Platinum 4GB
Graphics Card(s)
Sapphire HD4870 1GB 256-bit GDDR5
Sound Card
HT Omega Claro
Monitor(s) Displays
ViewSonic G220fb still rocks
Screen Resolution
1600x1200@85hz
Hard Drives
160GB Seagate 7200.10 Sata
150GB WD Raptor 10,000rpm Sata
PSU
Corsair TX950W
Cooling
Zalman 9700NT
Keyboard
Logitech Standard
Mouse
Microsoft SideWinder
Internet Speed
5.26MB down 0.86MB up
Other Info
APC BackUps 900VA
Sorry, but not since it was a slipstream SP1. If you installed Windows 7 and then the SP1 separately, you would have been able to delete the SP1 backup files. :(
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Thank you, you are great!
 

My Computer

Computer Manufacturer/Model Number
The cousin of our lawyer sold it to us.
OS
Windows 7 Ultimate
CPU
Dual Core
Memory
2GB RAM
Graphics Card(s)
8800 something
Monitor(s) Displays
Small monitor, and not flat
Hard Drives
320 GB HDD
Cooling
It has a strong ventilator, I can perfectly hear it :P
Mouse
Logitech
Internet Speed
No idea.

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack

My Computer

Computer Manufacturer/Model Number
The cousin of our lawyer sold it to us.
OS
Windows 7 Ultimate
CPU
Dual Core
Memory
2GB RAM
Graphics Card(s)
8800 something
Monitor(s) Displays
Small monitor, and not flat
Hard Drives
320 GB HDD
Cooling
It has a strong ventilator, I can perfectly hear it :P
Mouse
Logitech
Internet Speed
No idea.
I didn't think you were rude, I was being silly! :roflmao:
 

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack

My Computer

Computer Manufacturer/Model Number
The cousin of our lawyer sold it to us.
OS
Windows 7 Ultimate
CPU
Dual Core
Memory
2GB RAM
Graphics Card(s)
8800 something
Monitor(s) Displays
Small monitor, and not flat
Hard Drives
320 GB HDD
Cooling
It has a strong ventilator, I can perfectly hear it :P
Mouse
Logitech
Internet Speed
No idea.
Disk cleanup of huge amounts of lost space

I found 19GB of <Unknown> space in WinDirStat on my external hard drive. It was also showing as 'unmovable files' in Auslogics disk Defrag.

After some investigation I found 2 huge system restore point files hidden in the System Volume Information folder next to the MountPointManagerRemoteDatabase.

None of these can be deleted even with Admin privilege, but the system restore points can be removed in the System section of the control panel -> Control Panel>System>System Protection>Available Drives>(Select Drive) > Configure>Delete all restore points.

Done. 19GB back to me !

You need to turn off system protection to avoid them from coming back.

Hope this helps you save time
 

My Computer

Computer Manufacturer/Model Number
HP Elitebook 2530p
OS
Windows 7 Enterprise x64
CPU
Intel L9400 1.86GHz
Motherboard
HP
Memory
4GB
Graphics Card(s)
Intel(R) GMA
Sound Card
SoundMAX
Hard Drives
Toshiba 111GB
Hello TonyJB, welcome to Seven Forums; thanks for the info!
 

My Computer

Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
Back
Top