Discussion:
How to empty or reduce the size of the Windows Update Log?
(too old to reply)
Bruce Sanderson
2009-07-18 19:46:37 UTC
Permalink
I notice that the Windows Update Log (%systemroot%\WindowsUpdate.log) on
client computers is big and has records going back several years. This
makes it slow to open and view current entries to diagnose problems.

If I try and delete it, or open it in Notepad, delete some records, then
attempt to Save it, I get told that the file is in use by another process so
it can't be deleted (or renamed) or saved.

Is there a way to delete, rename or reduce the size of this log file?
--
Bruce Sanderson
http://members.shaw.ca/bsanders

It is perfectly useless to know the right answer to the wrong question.
Lawrence Garvin [MVP]
2009-07-19 02:14:54 UTC
Permalink
Post by Bruce Sanderson
I notice that the Windows Update Log (%systemroot%\WindowsUpdate.log) on
client computers is big and has records going back several years.
This is *extremely* abnormal.
Post by Bruce Sanderson
Is there a way to delete, rename or reduce the size of this log file?
Yes.

1. Stop the Automatic Updates service. (net stop wuauserv)

2. Delete the entire logfile (delete %windir%\WindowsUpdate.log)

3. Restart the Automatic Updates service (net start wuauserv)

The logfile is supposed to be maintained by the WUAgent. It's a rotating log
file and should auto-rotate approximately every 30 days or at 2MB size.

However, if permissions got changed on the logfile, or some other scenario
occurred that interfered with the default configuration, it's possible that
the WUAgent was unable to clear the logfile. Deleting the file and allowing
the WUAgent to recreate the file should resolve this issue.
--
Lawrence Garvin, M.S., MCITP:EA, MCDBA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2009)

MS WSUS Website: http://www.microsoft.com/wsus
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
Bruce Sanderson
2009-08-08 19:21:45 UTC
Permalink
Thanks, Gavin.

None of the Update logs I looked at are over 2 MB, but some are close to
that.

Most of them had entries several months old - e.g. going back to February or
March, 2009.
--
Bruce Sanderson
http://members.shaw.ca/bsanders

It is perfectly useless to know the right answer to the wrong question.
Post by Lawrence Garvin [MVP]
Post by Bruce Sanderson
I notice that the Windows Update Log (%systemroot%\WindowsUpdate.log) on
client computers is big and has records going back several years.
This is *extremely* abnormal.
Post by Bruce Sanderson
Is there a way to delete, rename or reduce the size of this log file?
Yes.
1. Stop the Automatic Updates service. (net stop wuauserv)
2. Delete the entire logfile (delete %windir%\WindowsUpdate.log)
3. Restart the Automatic Updates service (net start wuauserv)
The logfile is supposed to be maintained by the WUAgent. It's a rotating
log file and should auto-rotate approximately every 30 days or at 2MB
size.
However, if permissions got changed on the logfile, or some other scenario
occurred that interfered with the default configuration, it's possible
that the WUAgent was unable to clear the logfile. Deleting the file and
allowing the WUAgent to recreate the file should resolve this issue.
--
Lawrence Garvin, M.S., MCITP:EA, MCDBA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2009)
MS WSUS Website: http://www.microsoft.com/wsus
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
Lawrence Garvin [MVP]
2009-08-08 21:28:30 UTC
Permalink
Post by Bruce Sanderson
Thanks, Gavin.
None of the Update logs I looked at are over 2 MB, but some are close to
that.
This is as expected.
Post by Bruce Sanderson
Most of them had entries several months old - e.g. going back to February
or March, 2009.
Could be that I'm mistaken on the 30 days...

Could also be that the retention rules have been changed between WUAgent
versions...

On my Win7 RC machine, the logfile is slightly < 2MB and goes back to
6/12/09 (the installation date of the machine).

On my Vista SP2 machine, the logfile is only 1.3MB and only goes back 30
days (7/4/09).

The Vista machine is running the WSUS2SP2 RC v7.4 WUAgent; the Win7 RC
machine is running the Win7 native v7.3 WUAgent (not sure why it's not
selfupdated from my WSUS2SP2 RC server to the v7.4 WUAgent -- but it says no
selfupdate needed -- Interesting).

I also have a WinXP machine running the RC v7.4 WUAgent, and it has a 1.5MB
logfile going back to June 29th, which is the creation date of that logfile.

So maybe there's something unique going on in the Vista environment that's
truncating the log at 30 days, but not on other platforms.
--
Lawrence Garvin, M.S., MCITP:EA, MCDBA
Principal/CTO, Onsite Technology Solutions, Houston, Texas
Microsoft MVP - Software Distribution (2005-2009)

MS WSUS Website: http://www.microsoft.com/wsus
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
h***@gmail.com
2013-12-22 16:56:16 UTC
Permalink
Hi,

I also have a problem with the windowsupdate.log file. We have a server with an application that serves handhelds at our factory. These handhelds are windows mobile and connect via terminal services.

When I check the servers \users\ directory under each handhelds directory there is a windowsupdate.log file and the file sizes vary from a few megabytes to over 100MB.

I regularly have to manually delete these log files to clear up some space on the server.

Can you advise?

Thanks,
Haluk
Post by Bruce Sanderson
I notice that the Windows Update Log (%systemroot%\WindowsUpdate.log) on
client computers is big and has records going back several years. This
makes it slow to open and view current entries to diagnose problems.
If I try and delete it, or open it in Notepad, delete some records, then
attempt to Save it, I get told that the file is in use by another process so
it can't be deleted (or renamed) or saved.
Is there a way to delete, rename or reduce the size of this log file?
--
Bruce Sanderson
http://members.shaw.ca/bsanders
It is perfectly useless to know the right answer to the wrong question.
Loading...