Page 1 of 3 123 LastLast
Results 1 to 15 of 44
  1. #1
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Cleanmgr questions

    On Dec. 31, 2014, The WindowsSecrets top story was "Start the new year with a clean Windows PC" by Fred Langa. In the "Take out all the trash...." section, he talked about Windows Cleanmgr, said it still works fine with newer versions of Windows, and referenced:
    "Sageset Unlocks CleanMgr’s Power"
    http://windowssecrets.com/langalist-...eanmgrs-power/

    The Sageset article (also by Langa) references this Microsoft article:
    "How to Automate the Disk Cleanup Tool in Windows XP and Windows 7"
    http://support2.microsoft.com/defaul...;en-us;Q315246

    I have Windows 7 Pro (64 bit) with a SSD drive (C:) that contains my OS, my programs, AND all my data. I use my conventional D: drive only for backup files.

    I first tried following the tips in the Sageset article, accessing 'cleanmgr /sageset:99' using the Run command. I ran it as an Administrator. Langa says: "Note that some of the offered items may have additional options or advance settings that become visible when you click or check the item." I highlighted and/or checked every item on the list, and never saw any additional options or advance settings. So my first question is: did I miss something somewhere?

    Then I went to the Microsoft article, and opened Cleanmgr as they suggested (Start->Programs-> Accessories->System Tools->Disk Cleanup). Again I ran as an Administrator. The article says there is a long list of options which apparently can be specified, including: Temporary Offline Files, Offline Files, Compress Old Files, and Catalog Files for the Content Indexer. I cannot find any of these four options, whether Cleanmgr is accessed this way, or using 'cleanmgr /sageset:99', as used in the Langa article. So my second question is: are these four options available, and if so, how do I find/access them?

    Thanks in advance for any help you can provide.


    Harry
    Last edited by hmw; 2015-01-04 at 20:02. Reason: left something out

  2. #2
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    I'm guessing a Windows Update or Security Fix or something of that nature has changed it up a little. I just tried it on the Windows 7 side of my dual boot and didn't get the extended options selection.

    However, I used an elevated Command Prompt instead, and got it to work as it should. Right-click Command Prompt and select Run as administrator. Your prompt should read C:\Windows\System32>. Next type the commandline you've been using and hit Enter. A dialog box may open saying Disk Cleanup is examining your disk. Once that completes, you'll get the extended options selection box. I suggest you not select Compress old files (if it's offered), as that will take a very long time to run, but select any others you want.

    Then click OK. To run Disk Cleanup with your options, you can either use an elevated Command Prompt and type (without the quotes) "cleanmgr /sagerun:99" and hit Enter, or you can setup a shortcut on your desktop. If you use a shortcut (I do), for location use (without the quotes) "C:\Windows\System32\cleanmgr.exe /sagerun:99", then click Next. The /sagerun switch doesn't show up on the next screen, but it's there. Give your shortcut a name (I use Disk Cleanup) and click Finish.

    Before you run the shortcut, Right-click on it and select Properties. On the Properties sheet, click the Advanced button. On the Advanced Properties sheet, put a check by Run as administrator, then OK back out. Now you can run it, and it should run on every disk/partition/logical drive on your machine. You can also setup a task in Task Scheduler to run it on a schedule if you like. I'm setup that way.

    I've just checked this all out in Windows 7, and it works as I've described. Hope it does for you, too.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  3. #3
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    bbearren:

    Thanks for your prompt and thorough reply. You said:

    >>However, I used an elevated Command Prompt instead, and got it to work as it should. Right-click Command Prompt and select Run as administrator. Your prompt should read C:\Windows\System32>. Next type the commandline you've been using and hit Enter. A dialog box may open saying Disk Cleanup is examining your disk. Once that completes, you'll get the extended options selection box. I suggest you not select Compress old files (if it's offered), as that will take a very long time to run, but select any others you want.<<

    What did you enter on the Command Line? I tried several things, including 'cleanmgr /sageset:99'. What I got is exactly what I got before. See attachment. The top screen is the Disk Cleanup tab. The middle screen is the list of what is included in the 'Files to delete:' section. And the bottom screen is the More Options tab.

    Clicking or checking any item in the 'Files to delete:' section still does not bring me any additional options, and I still don't see the 4 files from the Microsoft Support article that I mentioned.

    It appears from your response that you are getting these, so I must be doing something wrong.


    Harry
    Attached Images Attached Images

  4. #4
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    bbearren:

    This link:
    http://www.thewindowsclub.com/compre...-drive-windows

    Said: 'In Windows 7, the Compress Old Files option was removed from the Disk Cleanup Utility.'

    Maybe others have also been removed and Microsoft never corrected their information.

    Harry

  5. #5
    Banned Member
    Join Date
    Mar 2012
    Location
    Calgary
    Posts
    2,522
    Thanks
    0
    Thanked 170 Times in 142 Posts
    Harry, I have a tutorial on this in this (somewhere, lol) and most of the Tech Forums where I write. I have mine set to run automatically as a Scheduled Task in both 8.1 & 10... I, also, always used it pre-8.1, as well.

    It's great because it offers more than the standard Disc Cleanup and one does not have to recheck the boxes each time of running (daily or nightly). There are 2 or 3 items @ the bottom of the list one does not want to have checked.

    Anyway...

    >cmd, Run as admin

    cleanmgr sageset:1 (ENTER)

    Window w/ item list. Check the ones you want. Highlighting each gives a description & whether it's a good idea to check them or not. Once that is done hit OK

    Next, again in cmd

    cleanmgr sagerun:1 (ENTER)

    Once it starts running (you'll see progress bar windows) cmd can be closed.

    The next time it's run it will not be necessary to check the boxes. The checks put in the 1st time stay.

    That's it. Articles about things oft make things (seem) more complicated than need be or than they really, actually, are or need to be.

    I trust this will help you.

    This CL will, after the 1st time, does it all in 1 motion (instead of the set & run commands)
    %SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535

    If you want to schedule the task in Actions tab put
    C:\Windows\System32\cleanmgr.exe/sagerun:01

    But, that ^ is after the 1st time using cleanmgr sageset:1 which, gives you the opportunity to check the boxes you want used going forward.

    Cheers,
    Drew
    Windows 10OS.jpg

  6. #6
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Quote Originally Posted by hmw View Post
    bbearren:

    Thanks for your prompt and thorough reply. You said:

    >>However, I used an elevated Command Prompt instead, and got it to work as it should. Right-click Command Prompt and select Run as administrator. Your prompt should read C:\Windows\System32>. Next type the commandline you've been using and hit Enter. A dialog box may open saying Disk Cleanup is examining your disk. Once that completes, you'll get the extended options selection box. I suggest you not select Compress old files (if it's offered), as that will take a very long time to run, but select any others you want.<<

    What did you enter on the Command Line? I tried several things, including 'cleanmgr /sageset:99'. What I got is exactly what I got before. See attachment. The top screen is the Disk Cleanup tab. The middle screen is the list of what is included in the 'Files to delete:' section. And the bottom screen is the More Options tab.

    Clicking or checking any item in the 'Files to delete:' section still does not bring me any additional options, and I still don't see the 4 files from the Microsoft Support article that I mentioned.

    It appears from your response that you are getting these, so I must be doing something wrong.


    Harry
    The tutorial you're referencing is old, and the options in Windows 7 have changed since its publication. It isn't that you are doing something wrong, it's just that some of the things you're looking for simply are no longer there.

    I'm on my Windows 7 Professional box now, and I've just run through the setup I listed in my previous post for the extended Cleanmgr options. Following are screen shots taken sequentially, going through the options screen. I've overlapped each screen shot to include the last item in the list from the previous shot, so you can see that these are all the options that are currently available in an up-to-date installation of Windows 7 Professional; 22 in all, if I counted correctly.


    Cleanmgr Commandline.PNG Disk Cleanup Options.PNG


    Disk Cleanup Options1.PNG Disk Cleanup Options2.PNG


    Disk Cleanup Options3.PNG Disk Cleanup Options4.PNG


    Disk Cleanup Options5.PNG Disk Cleanup Run.PNG

    After running the /sageset switch (I used 01 instead of 99, but that has no bearing on the outcome so long as the same number is used in the /sagerun switch; one may use any number up to and including 65535), I created a desktop shortcut, set it for Run as administrator, and then ran it. Double-clicking the shortcut puts up a UAC prompt; acknowledge the prompt (put in the correct password if you're running as a standard user, which I do), click Yes and cleanmgr runs with all the options you have selected on every drive/partition/logical drive on you PC. HTH

    Setting up Disk Cleanup in Task Scheduler is a link to a tutorial I posted back in April, if you want to automate your cleanup (I've edited that tutorial to reflect the changes in Windows 7 we've encountered here).
    Last edited by bbearren; 2015-01-05 at 10:17. Reason: added link
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  7. The Following User Says Thank You to bbearren For This Useful Post:

    Browni (2015-01-05)

  8. #7
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Drew:

    Thanks for the tips. They are clear.

    I use an old IBM style keyboard which does not have a WIndows key--therefore don't know how to access the Action tab you talk about

    Harry.

  9. #8
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    bbearren:

    Thanks for the screenshots and the details. I have 20 options vs. your 22. The two missing are obviously things you use/have done that I do not. Clearly I was trying to go into more detail than was necessary. I think I am all set now.

    I have a utility, Snagit, which allows me to capture everything in a scrolling window, so I don't have to take the multiple screenshots that you did. Attached is my list of 20 options done with Snagit. [I usually use black and white, but could also do in color]

    Harry
    Attached Images Attached Images

  10. #9
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    I count 21 for you, 22 for me, the difference being Offline webpages.

    FWIW, I have Task Scheduler run the extended disk cleanup nightly.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  11. #10
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    bbearren:

    >>I count 21 for you, 22 for me.
    You would think that a retired engineer could at least count correctly <g>.

    I have a few questions that came up as I went through this, and they are numbered in the following text.

    First I did an Image backup of C:. Then I opened Disk Cleaner as an Administrator from Accessories->System Tools, because it gives me an idea of how many MB are in each category that it lists. I used that as a guideline when I ran cleanmgr /sageset:99 as an Administrator from the Command Prompt, following your suggestions. I was very cautious, because it was not clear to me exactly what everything did, and I never could find clear info.
    1. Is there some way that I can see the number of MB that are in each category listed when I open cleanmgr from the Command Prompt? That would help determine which are not worth pursuing.

    My first attachment (cleanmgr_3.jpg) is what Disk Cleaner displayed, and cleanmgr_4.jpg shows the checkmarks for what I actually ran. I did not run 'Windows Update Cleaner' even though it contains over 2 GB.
    2. Is there any possibility that I would ever need to access any past updates, or is it always safe to run 'Windows Update Cleaner'?

    I did delete the Temporary files. The Windows Support article said that it was safe to delete these files that had not been modified within the last week.
    3. Does cleanmgr check the dates of all temporary files? If not, how does one use this tool to retain any modified within the last week?
    4. My Windows->Temp folder still contains about 340 MB of data. Most of these are not .tmp files, but some are (with dates going back over a year). Why are they still there?

    There is a folder named 'System Volume Information'. I searched the Internet articles, but could never understand exactly what the files in the folder are. I was never able to actually open this folder in Explorer {says it can't be shared}, so I could not determine the size. But I have a utility, Folder Size, which does open it when I run it as an Administrator. I ran it before and after I ran cleanmgr to try and determine what folders had their size significantly changed. System Volume Information actually INCREASED by about 400 MB (see cleanmgr_5.jpg).
    5. What is in System Volume Information, and why would it increase after running cleanmgr?
    6. Can any of the files in System Volume Information be safely deleted, and if so how?
    7. I also noticed that I have a large System Volume Information folder on my D: drive. Could that be because I have my Virtual XP-Mode installed there?

    >>FWIW, I have Task Scheduler run the extended disk cleanup nightly.
    Great idea, though not sure I will need to do it that often.

    Thanks so much for your ongoing help on this.

    Harry
    Attached Images Attached Images

  12. #11
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Quote Originally Posted by hmw View Post
    1. Is there some way that I can see the number of MB that are in each category listed when I open cleanmgr from the Command Prompt? That would help determine which are not worth pursuing.
    No, there is not. However, even in its most aggressive cleanup mode, Windows is still conservative enough to do no harm.

    2. Is there any possibility that I would ever need to access any past updates, or is it always safe to run 'Windows Update Cleaner'?
    Highly unlikely. Windows Update Cleaner only removes leftovers from update packages that have been successfully installed. Installed updates also update the Component Store, which is where known good system file copies are stored as an image file. If that image should become damaged, the Deployment Image Servicing and Management (DISM) tool can almost always repair it.

    3. Does cleanmgr check the dates of all temporary files? If not, how does one use this tool to retain any modified within the last week?
    It is my understanding that cleanmgr does indeed take into account file attributes in its algorithms. Although I haven't been able to find any information anywhere to verify this, I've been running the extended cleanmgr (everything checked) nightly for several years, now, and I have yet to have any issues whatsoever.

    4. My Windows->Temp folder still contains about 340 MB of data. Most of these are not .tmp files, but some are (with dates going back over a year). Why are they still there?
    Even in its most aggressive cleanup mode, Windows is still conservative enough to do no harm.

    5. What is in System Volume Information, and why would it increase after running cleanmgr?
    That folder contains your System Restore points. Windows probably sets a new Restore Point when running cleanmgr. I don't use System Restore, and have it disabled, preferring drive imaging instead.

    6. Can any of the files in System Volume Information be safely deleted, and if so how?
    Yes. From Windows How-to: To delete all but the most recent restore point
    1. Open Disk Cleanup by clicking the Start button. In the search box, type Disk Cleanup, and then, in the list of results, click Disk Cleanup.
    2.If prompted, select the drive that you want to clean up, and then click OK.
    3.In the Disk Cleanup for (drive letter) dialog box, click Clean up system files. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
    4.If prompted, select the drive that you want to clean up, and then click OK.
    5.Click the More Options tab, under System Restore and Shadow Copies, click Clean up.
    6.In the Disk Cleanup dialog box, click Delete.
    7.Click Delete Files, and then click OK.


    7. I also noticed that I have a large System Volume Information folder on my D: drive. Could that be because I have my Virtual XP-Mode installed there?
    That may well be the cause, since System Volume Information contains your System Restore points.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  13. #12
    Banned Member
    Join Date
    Mar 2012
    Location
    Calgary
    Posts
    2,522
    Thanks
    0
    Thanked 170 Times in 142 Posts
    Quote Originally Posted by hmw View Post
    Drew:

    Thanks for the tips. They are clear.

    I use an old IBM style keyboard which does not have a WIndows key--therefore don't know how to access the Action tab you talk about

    Harry.
    Harry,

    1st of all, you're welcome.

    Lack of a Windows Key is not an obstacle for this. Just type Schedule Tasks or Task Scheduler in the Search box of your Start Menu. When creating a (New) Task the Actions tab is one of the parameters one sets of said Task.

    I trust this helps & clarifies... please, let me know. Always happy to help further if need be.

    Cheers,
    Drew
    Windows 10OS.jpg

  14. #13
    Banned Member
    Join Date
    Mar 2012
    Location
    Calgary
    Posts
    2,522
    Thanks
    0
    Thanked 170 Times in 142 Posts
    Quote Originally Posted by bbearren View Post
    I count 21 for you, 22 for me, the difference being Offline webpages.

    FWIW, I have Task Scheduler run the extended disk cleanup nightly.
    Same as I and as should be, too.

    Cheers,
    Drew
    Windows 10OS.jpg

  15. #14
    Banned Member
    Join Date
    Mar 2012
    Location
    Calgary
    Posts
    2,522
    Thanks
    0
    Thanked 170 Times in 142 Posts
    Harry,

    "Great idea, though not sure I will need to do it that often", Harry

    I mean this in the nicest way possible... wrong. Daily is not "often", it is proper. And if it is running automatically AND in the background, well, who cares. Just let the janitor do his valuable work.

    Now, a while back I mentioned 2 things... (1) "A couple of items near the bottom of the list should NOT be checked and (2) highlighting each item gives a description & suggests whether it may be a bad idea to include them. In 8.1 they are:
    Update Pgk Bkup Files
    Windows ESD installation Files
    Windows Upgrade log files

    May not be exactly the same in your OS; just read the blurbs. Tells you whether OK or not. They are the same in both 8.1 & 10. If memory serves me, same in 7... sorry, I don't have a VM of 7 running right now to check. I'm old but, the memory, still, works.

    Check all the rest. And leave the driving to Greyhound. No need to over think it... it's a smart OS & knows what to do.

    I put mine on daily auto long ago, just doing it daily (actually, nightly) anyway so... I didn't have to remember or bother... just peace of mind knowing it's being done regularly & consistently.

    Cheers,
    Drew
    Windows 10OS.jpg
    Last edited by Drew1903; 2015-01-06 at 02:35.

  16. #15
    2 Star Lounger
    Join Date
    Jul 2013
    Posts
    171
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Drew:

    Thanks for the tips.

    I have 'Windows upgrade log files' on my computer, and there is a warning for it.

    But there is one named "Files discarded by Windows upgrade' that is not clear. When I updated 7 Pro to SP1, is that considered by Disk Cleanup an 'upgrade'? And if so, is this a safe one to check?

    Also one named 'Service Pack Backup Files'. Wasn't sure about it either.

    Then there is another entry named 'Previous Windows installations'. I assume that means if I had upgraded from say Vista or XP. This was a new computer, so Win 7 is the only OS every installed.


    Harry
    Last edited by hmw; 2015-01-06 at 15:58. Reason: left out a question

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •