You’re staring at your File Explorer, watching that red bar on your C: drive get thinner by the second. You haven't downloaded any movies. You haven't installed new games. Yet, tens of gigabytes have just… evaporated. If you’re a power user or a sysadmin managing Intune, there is a very high chance you've fallen victim to the winget large log files glitch.
It’s a weird one. Usually, logs are just boring little text files that track what a program is doing. But with winget (the Windows Package Manager), something can go sideways, turning those logs into massive, multi-gigabyte monsters that eat your SSD alive. I’ve seen reports of single log files hitting 70GB or more. That’s not a log; that’s a digital black hole.
Where are these giant files hiding?
Windows doesn't make it obvious. If you want to see if this is what's killing your storage, you need to look in two specific spots.
The most common culprit for regular users is:%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
But if you’re on a machine managed by a company (Intune/Endpoint Manager), the "big boys" usually live here:C:\Windows\Temp\WinGet\defaultState
👉 See also: Why an Actual Picture of the Sun Is Way Stranger Than You Think
Honestly, just paste those paths into your file explorer address bar. If you see a file named something like WinGet-2026-01-17-14-30-05.652.log and it’s bigger than a few megabytes, you’ve found the leak.
Why do winget large log files even happen?
Basically, it's a "loop of doom."
Winget is designed to be chatty, but it’s supposed to clean up after itself. However, certain bugs—often related to the Intune Management Extension or specific app update failures—cause winget to get stuck. It tries to install or update something, fails, logs the error, and then immediately tries again.
Imagine a robot trying to walk through a glass door. Every time it hits the glass, it writes a page about how it hit the glass. If it tries 1,000 times a second, you’re going to run out of paper pretty fast.
Real-world cases, like the ones discussed on GitHub and Reddit (specifically issue #5776 on the winget-cli repo), suggest that "Invalid window handle" errors or primary user mismatches in Intune are the biggest triggers. The system gets confused about who is logged in, winget panics, and the log file grows until the disk is literally at 0 bytes.
How to kill the bloat (and keep it dead)
You can't always just hit "Delete." Often, Windows will tell you the file is in use. Here is the actual, no-nonsense way to fix it.
1. Stop the service first
If the file won't delete, the "Intune Management Extension" or the "App Installer" process is probably hugging it.
👉 See also: Why That Text Message That Turns Off iPhone Keeps Happening
- Open Services.msc.
- Find Intune Management Extension.
- Right-click and hit Stop.
- Now go delete those winget large log files in the Temp folder.
- Start the service back up.
2. The "Nuclear" command
If you want to do this via PowerShell (which is way faster), use this:Stop-Service -Name IntuneManagementExtension -Force; Remove-Item -Path "C:\Windows\Temp\WinGet\defaultState\*" -Force; Start-Service -Name IntuneManagementExtension
3. Tweak the WinGet settings
Did you know winget actually has a built-in "trash collector"? Most people don't because it’s hidden in a JSON file. You can tell winget to cap the total size of its logs so this never happens again.
Run winget settings in your terminal. It’ll open a JSON file in Notepad. You want to add or edit the logging section to look like this:
"logging": {
"level": "info",
"file": {
"totalSizeLimitInMB": 128,
"ageLimitInDays": 7
}
}
This tells winget: "Look, I like you, but you get 128MB of space, max. Anything older than a week goes in the bin."
The Intune "Primary User" Gotcha
If you are a sysadmin and this is happening to dozens of PCs in your fleet, deleting files is just a band-aid. The root cause is often that the Primary User assigned in Intune doesn't match the person actually logged into the laptop.
When the Intune Management Extension tries to run a winget command in the "User" context, it fails because the IDs don't match. It then retries infinitely. Changing the Primary User in the Intune portal to the actual current user often stops the log-spew instantly.
Why this matters for SSD health
It’s not just about the lost space.
Modern SSDs have a "TBW" (Total Bytes Written) rating. If winget is writing 50GB of junk to your drive every single day because of a bug, it is prematurely aging your hardware. It’s essentially "wear and tear" for no reason.
Actionable steps to take right now
- Check your space: Open
C:\Windows\Temp\WinGetand check the folder size. - Set a limit: Use
winget settingsand add thetotalSizeLimitInMBkey. It takes 30 seconds and saves you 30GB later. - Check for updates: Microsoft has been rolling out fixes for this in the "App Installer" (which contains winget) via the Microsoft Store. Ensure your Store apps are actually updating.
- Clear the logs: If you just want a quick clean, run
winget source update --logsto at least see where the current ones are, then manually purge.
Don't let a text file be the reason your computer crashes. A few lines of config are all it takes to keep winget on a short leash.