Link to home
Start Free TrialLog in
Avatar of mrosier
mrosierFlag for United States of America

asked on

Windows 2008 standard, Disk Cleanup, and Winsxs

Hello!
I am trying to free up C drive space by cleaning up items from the Winsxs folder using the Disk Cleanup utility which I installed from the server features. However, there does not appear to be an option to cleanup the Winsxs folder in the utility as there is in the R2 options. Can someone tell me how I can go about cleaning up space in the Winsxs folder given this? I have folders in there from 2008 and I figure I surely can delete at least a chunk of this folder given the ages of these folders (I have not plans to rollback to those updates :D)
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

Have you already moved the printer spool folder and the swap file?  There are some other files that you can move also to get back some space that are less risky.

How big is C:?

Do you have a long-range plan for how to deal with disk space on C:?  The cleanup you are attempting will just buy you some time.
The SXS folder is a copy of the Installation media. You *do not* want to remove anything in there, since doing so will require you to have the original installation media to make any significant changes to the server. There are many more easy to delete items on the drive than that. For instance, if you have IIS on the server, go to C:\inetpub\logs\ and clear any files out of the sub directories in there. You can also look at c:\windows\logs\cbs to see if the files in there are taking up lots of space (These can be cleared safely in most cases). Use windirstat to get a better idea of where your space is being used up and address from there: https://windirstat.net/

In general, avoid messing with too much stuff that isn't in a folder named "Logs" or "logging" on the system drive, since most of what's on C:\ is required.
Avatar of mrosier

ASKER

Well, I have 68 GB total and 15GB free. I know that's a bit, but I am trying to be proactive. And just to be clear this is not R2, this is Standard. I haven't actually touched anything yet since I am not sure what is ok to delete/move and what isn't. I see some people saying not to touch the contents of Winsxs and some saying it is ok as long as there are no rollback plans. I am going to just do an entire server upgrade next year is my plan, so I don't need it longterm. Can you tell me more about moving the swap file and printer spool?
Avatar of mrosier

ASKER

Thanks Adam, I some stuff in the CBS location. The largest there is CBS.persist.log. Am I able to do anything with that?

Is there a way to cleanup old Windows Update related files? I am not rolling back any updates from over a year ago, so I was hoping for that at the least.
You can clear pretty much anything in the CBS folder without issues. They're all diagnostic log files.

Also, look at this: https://blogs.technet.microsoft.com/askpfeplat/2014/05/13/how-to-clean-up-the-winsxs-directory-and-free-up-disk-space-on-windows-server-2008-r2-with-new-update/ since it will help you clean up the uninstall files for updates by using the disk cleanup utility.
Avatar of mrosier

ASKER

Thanks on the CBS stuff Adam! Can I just delete it or do I need to restart any services as well?

For the disk cleanup utility, that is for R2. I have used it already too, but the specified cleanup option isn't there because my server is Standard.
For the swap file, try: Control Panel, System, Advanced System Settings, Advanced, Performance Settings, Advanced.  Change the Virtual Memory for C: to 0 and set it as you wish on D:.

For the print spool location, in Devices and Printers click on Print Server Properties (may have to click on a shared printer first), Advanced, Change Advanced Settings.

These steps are from a different version of Windows, but should be similar.
Just delete the CBS stuff. CBS log files are only generated when the SFC.exe utility is run (there is a scheduled task that runs it to check for corrupt system files), and it will create a new log file if none is present.

There may be a 2008 standard version of the update that will work for you, but I don't have a moment right now to look for it. The update files are stored in SXS, but you don't really want to go mucking around in there without solid knowledge of what everything is.
Avatar of mrosier

ASKER

CompProbSolv - thanks a bunch, I will check into those and report back

Adam - thanks as well for that CBS, it freed up a few hundred meg at least which is always good. I will avoid altering winsxs then without anything automated as I know some stuff is crucial and some stuff isn't and I really don't know how to tell the difference myself of course.
Avatar of mrosier

ASKER

Hey CompProbSolv,
I am checking out the Virtual Memory on the server, and it is set to "Automatically manage paging file size for all drives". Currently, the C is allocated with 8489MB. I don't see a spot to reset it to 0 other than using the customization range somehow. Here's the mod window:
User generated image
For the  Print Spooler, I have gone down to the Advanced tab via Print Server Properties, but there is no option to Change Advanced Settings. See attached:User generated image
ASKER CERTIFIED SOLUTION
Avatar of CompProbSolv
CompProbSolv
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrosier

ASKER

Thanks, I made those changes. The Printer option I actually left alone since that folder location is empty anyway. After making the Virtual Memory change, do I delete anything, or should the C drive adjust itself automatically for the existing file?
The C: drive should adjust automatically.  Though I've not used it (I use TreeSizeFree from jam-software.com) I would expect that windirstat recommended above will let you know.  Look for large hidden files in  C:\ (pagefile.sys and hiberfil.sys) .  You shouldn't be seeing any.

Do you have any shared printers on the server?  If so, when someone prints through them, the print jobs will temporarily reside in the Spool folder.  This can be a short-term problem or a long-term one if there's a printer that is no longer online and someone prints to it repeatedly.
Avatar of mrosier

ASKER

Thanks Comp, I did make that adjustment, but my pagefile.sys is still present on C
It probably requires a reboot, then.  That pagefile.sys should be 8489M in size and is a result of the Virtual Memory setting.
did you consider to moving the c drive to a new 256 gb ssd? it costs 100$ and cloning could be done easily.

Sara
Avatar of mrosier

ASKER

Comp, so after setting the C to none for Virtual Memory, do a reboot?

Sara, am I able to do that on a RAID configuration? I have the C running on two drives running RAID 1+0
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrosier

ASKER

ok thanks Comp, I will give it a reboot and see what happens! May I assume if that presents any kind of problem to me after doing it that I can just go back in and make it system managed again?

I agree too, I should be fine til 2017 with that as long as I leave it alone, but I like to be proactive about this sort of thing too.
" I can just go back in":
Yes, as long as the system boots.  You must have noted that there was a warning that it may not boot when you turned off Virtual Memory for C:.  I've done it numerous times (and added it to a different partition) with no problems.  My presumption has always been that the risk is that you don't have enough RAM to boot without Virtual Memory available.  If that's the case, you don't have nearly enough RAM in the system!
Avatar of mrosier

ASKER

Ok thanks Comp! I will make sure of that before I do anything. Is there any way I can check to see if it is used for bootup before I do anything? I had a reboot overnight last night and I see the pagefile last modified timestamp is right around that point.
"I had a reboot overnight last night":
before or after changing the Virtual Memory on C: to 0?  If after, then it didn't work as expected.

If Virtual Memory on C: is set to anything but 0 it WILL be used during boot.  The critical question is whether or not it is needed to boot.  I'm assuming from your info above that you have 8G of RAM.  Unless you have something that uses a LOT of RAM loading with the OS, that should be more than enough.
Avatar of mrosier

ASKER

gotcha, thanks Comp! I hadn't made the change yet actually, I was wanting to make sure because I know it can be a critical file/functionality. I might try disabling any 3rd party startup applications, do a reboot to bring it back to 0, then turn it back on to see if anything inflates it again. Could be a holdover from something years ago. Should that be sound given that my normal startup like that doesn't each the entire 8GB?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrosier

ASKER

Thanks Comp, so if I set the D drive with plenty of space to use system managed virtual memory and turn it off on  C then reboot, I shouldn't have any problems then since D would be used instead?
Avatar of mrosier

ASKER

ahh ok thanks Comp, I will do that then! I appreciate your patience and perseverance with me!
Avatar of mrosier

ASKER

The solution gives me all I need for my current issue, but I was not able to get any feedback on how to cleanup Windows Updates files
Adam should be given some points for his comments on the SXS and Logs folders as they were accurate and useful.
Avatar of mrosier

ASKER

dang it, I honestly forgot about it. Can I still do that? My apologies Adam!!!