@echo off
:: Clear Winget Logs Script
:: This script deletes Winget logs from the default location.

echo Clearing Winget logs from the default location...

set "WingetLogDir=%LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir"

if exist "%WingetLogDir%" (
    echo Found Winget log directory: %WingetLogDir%
    echo Deleting logs...
    del /q "%WingetLogDir%\*.*"
    echo Logs cleared successfully.
) else (
    echo Winget log directory not found: %WingetLogDir%
    echo No logs to clear.
)

pause
