Skip to content

Commit 3df0415

Browse files
authored
Add retention info for WinGet logs (#3748)
* Add retention info for WinGet logs * Add preserve comment
1 parent 3b12255 commit 3df0415

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

hub/package-manager/winget/troubleshooting.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
---
22
title: Debugging and troubleshooting issues with the winget tool
33
description: Provides information on logging and winget diagnostics.
4-
ms.date: 10/01/2021
4+
ms.date: 08/31/2023
55
ms.topic: article
66
ms.localizationpriority: medium
77
---
88

99
# Debugging and troubleshooting issues with the winget tool
1010

11-
When Windows Package Manager is installing, searching or listing applications, sometimes it is necessary to look at the log files to understand the behavior better.
11+
When Windows Package Manager is installing, searching or listing applications, sometimes it is necessary to look at the log files to better understand the behavior.
1212

13-
## Logs
13+
## WinGet Logs
1414

15-
Windows Package Manager by default creates log files when executing commands. These log files are located here:
15+
Windows Package Manager by default creates log files when executing commands. These logs contain information that can aid in debugging issues with WinGet. There is no maximum size for the log files. They are typically only a few KB in size. When the number of log files in the directory exceeds 100, the oldest log files will begin being deleted. There is no time-based removal of logs and these settings are not configurable. If you have reached the 100 file log capacity, just move any WinGet logs that you wish to preserve into a different directory.
16+
17+
Use the command [`winget --info`](./info.md) to find the directory path to your WinGet log files. The default path for WinGet log files is:
1618

1719
```CMD
18-
> Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
20+
%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
1921
```
2022

2123
You can include the **--logs** or **--open-logs** option to any command to open the logs directory after the command completes. Here are some examples of using the **--logs** option:

0 commit comments

Comments
 (0)