Clear Outlook logs and telemetry
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Windows onlyThis script improves your privacy on Windows
- Impact: MinimumSystem Functionality Loss Risk: Low
This action improves privacy with minimal impact when you run the recommended script. - Batch (batchfile)These changes use Windows system commands to update your settings.
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
This script removes Outlook diagnostic logs and telemetry data to enhance privacy without affecting performance.
The diagnostic logs and telemetry data reveal your Outlook application usage patterns 1. These logs may grow extremely large over time, sometimes reaching several gigabytes in size 2 3.
These files are valuable in forensic analysis. They can be examined to study your behavior and potentially used as evidence about your activities 4. Microsoft uses this data for debugging and performance monitoring purposes 5.
Removing this data improves your privacy by eliminating tracking information and frees up disk space.
Unlike clearing caches, removing these logs has no impact on Outlook's performance or startup time 5. Your user data and application configuration including email, contacts, and settings will remain intact.
Technical Details
This script clears only the logs and telemetry data:
Location | Description | Content |
---|---|---|
%LOCALAPPDATA%\Microsoft\Olk\logs 1 3 4 5 | Logs and Telemetry Cache 5 | Diagnostics and performance logs 5 |
%LOCALAPPDATA%\Microsoft\Olk\cache 5 | Logs and Telemetry Cache 5 | Telemetry and diagnostic data cache 5 |
Sources
- Control installation and use of new Outlook - Microsoft 365 Apps. Microsoft Learn. learn.microsoft.com. (2025).
Original: https://learn.microsoft.com/en-us/microsoft-365-apps/outlook/get-started/control-install
Archived: https://web.archive.org/web/20250404225726/https://learn.microsoft.com/en-us/microsoft-365-apps/outlook/get-started/control-install - Outlook is creating Huge log files, up to 80gbs without logging - Microsoft Community. answers.microsoft.com. (2025).
Original: https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-is-creating-huge-log-files-up-to-80gbs/2fc2816a-c6c9-4085-983e-a64a5431faaa
Archived: https://web.archive.org/web/20250414175449/https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-is-creating-huge-log-files-up-to-80gbs/2fc2816a-c6c9-4085-983e-a64a5431faaa - How to Turn Off Logging in New Outlook. Microsoft Community Hub. (2025).
Original: https://techcommunity.microsoft.com/discussions/outlookgeneral/how-to-turn-off-logging-in-new-outlook/4097943
Archived: https://web.archive.org/web/20250414182414/https://techcommunity.microsoft.com/discussions/outlookgeneral/how-to-turn-off-logging-in-new-outlook/4097943 - Microsoft Outlook Forensic Analysis - Mehmet Kadir Cırık. (2025).
Original: https://www.kadircirik.com/microsoft-outlook-forensic-analysis
Archived: https://web.archive.org/web/20250124001851/https://www.kadircirik.com/microsoft-outlook-forensic-analysis/ - New Outlook for Windows for virtualized desktop infrastructure (VDI) - Microsoft 365 Apps. Microsoft Learn. learn.microsoft.com. (2025).
Original: https://learn.microsoft.com/en-us/microsoft-365-apps/outlook/get-started/virtualized-desktop-infrastructure
Archived: https://web.archive.org/web/20250414175604/https://learn.microsoft.com/en-us/microsoft-365-apps/outlook/get-started/virtualized-desktop-infrastructure
Apply Now
Choose one of three ways to apply:
Download script
Download and run the script directly- No app needed
- Offline usage
- Easy-to-apply
- Free
- Open-source
Help
How to apply or restore "Clear Outlook logs and telemetry" using script
- ≈ 2 min to complete
- Tools: Web Browser
- Difficulty: Simple
- ≈ 5 instructions
- 1
Download
Download the script file by clicking on thebutton above.
Use button above to restore changes. - 2
Keep the file
If warned by your browser, keep the file. - 3
Open
Open the downloaded file. - 4
Exit
Once it's done, press any key to exit the window. - 5
Restart
Restart your computer for all changes to take effect.
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
Help
How to apply or restore "Clear Outlook logs and telemetry" using privacy.sexy
- ≈ 3 min to complete
- Tools: privacy.sexy
- Difficulty: Simple
- ≈ 4 instructions
- 2
Choose script
- Search for the script name: Clear Outlook logs and telemetry
- Check the script by clicking on the checkbox.
- 3
Run
Click on ▶️ Run button at the bottom of the page.This button only appears on desktop version (recommended). On browser, use 💾 Save button.
- Apply
- Revert
:: Clear directory contents : "%LOCALAPPDATA%\Microsoft\Olk\logs"
PowerShell -ExecutionPolicy Unrestricted -Command "$pathGlobPattern = "^""$($directoryGlob = '%LOCALAPPDATA%\Microsoft\Olk\logs'; if ($directoryGlob.EndsWith('\*')) { $directoryGlob } elseif ($directoryGlob.EndsWith('\')) { "^""$($directoryGlob)*"^"" } else { "^""$($directoryGlob)\*"^"" } )"^""; $expandedPath = [System.Environment]::ExpandEnvironmentVariables($pathGlobPattern); Write-Host "^""Searching for items matching pattern: `"^""$($expandedPath)`"^""."^""; $deletedCount = 0; $failedCount = 0; $foundAbsolutePaths = @(); Write-Host 'Iterating files and directories recursively.'; try { $foundAbsolutePaths += @(; Get-ChildItem -Path $expandedPath -Force -Recurse -ErrorAction Stop | Select-Object -ExpandProperty FullName; ); } catch [System.Management.Automation.ItemNotFoundException] { <# Swallow, do not run `Test-Path` before, it's unreliable for globs requiring extra permissions #>; }; try { $foundAbsolutePaths += @(; Get-Item -Path $expandedPath -ErrorAction Stop | Select-Object -ExpandProperty FullName; ); } catch [System.Management.Automation.ItemNotFoundException] { <# Swallow, do not run `Test-Path` before, it's unreliable for globs requiring extra permissions #>; }; $foundAbsolutePaths = $foundAbsolutePaths | Select-Object -Unique | Sort-Object -Property { $_.Length } -Descending; if (!$foundAbsolutePaths) { Write-Host 'Skipping, no items available.'; exit 0; }; Write-Host "^""Initiating processing of $($foundAbsolutePaths.Count) items from `"^""$expandedPath`"^""."^""; foreach ($path in $foundAbsolutePaths) { if (-not (Test-Path $path)) { <# Re-check existence as prior deletions might remove subsequent items (e.g., subdirectories). #>; Write-Host "^""Successfully deleted: $($path) (already deleted)."^""; $deletedCount++; continue; }; try { Remove-Item -Path $path -Force -Recurse -ErrorAction Stop; $deletedCount++; Write-Host "^""Successfully deleted: $($path)"^""; } catch { $failedCount++; Write-Warning "^""Unable to delete $($path): $_"^""; }; }; Write-Host "^""Successfully deleted $($deletedCount) items."^""; if ($failedCount -gt 0) { Write-Warning "^""Failed to delete $($failedCount) items."^""; }"
:: Clear directory contents : "%LOCALAPPDATA%\Microsoft\Olk\cache"
PowerShell -ExecutionPolicy Unrestricted -Command "$pathGlobPattern = "^""$($directoryGlob = '%LOCALAPPDATA%\Microsoft\Olk\cache'; if ($directoryGlob.EndsWith('\*')) { $directoryGlob } elseif ($directoryGlob.EndsWith('\')) { "^""$($directoryGlob)*"^"" } else { "^""$($directoryGlob)\*"^"" } )"^""; $expandedPath = [System.Environment]::ExpandEnvironmentVariables($pathGlobPattern); Write-Host "^""Searching for items matching pattern: `"^""$($expandedPath)`"^""."^""; $deletedCount = 0; $failedCount = 0; $foundAbsolutePaths = @(); Write-Host 'Iterating files and directories recursively.'; try { $foundAbsolutePaths += @(; Get-ChildItem -Path $expandedPath -Force -Recurse -ErrorAction Stop | Select-Object -ExpandProperty FullName; ); } catch [System.Management.Automation.ItemNotFoundException] { <# Swallow, do not run `Test-Path` before, it's unreliable for globs requiring extra permissions #>; }; try { $foundAbsolutePaths += @(; Get-Item -Path $expandedPath -ErrorAction Stop | Select-Object -ExpandProperty FullName; ); } catch [System.Management.Automation.ItemNotFoundException] { <# Swallow, do not run `Test-Path` before, it's unreliable for globs requiring extra permissions #>; }; $foundAbsolutePaths = $foundAbsolutePaths | Select-Object -Unique | Sort-Object -Property { $_.Length } -Descending; if (!$foundAbsolutePaths) { Write-Host 'Skipping, no items available.'; exit 0; }; Write-Host "^""Initiating processing of $($foundAbsolutePaths.Count) items from `"^""$expandedPath`"^""."^""; foreach ($path in $foundAbsolutePaths) { if (-not (Test-Path $path)) { <# Re-check existence as prior deletions might remove subsequent items (e.g., subdirectories). #>; Write-Host "^""Successfully deleted: $($path) (already deleted)."^""; $deletedCount++; continue; }; try { Remove-Item -Path $path -Force -Recurse -ErrorAction Stop; $deletedCount++; Write-Host "^""Successfully deleted: $($path)"^""; } catch { $failedCount++; Write-Warning "^""Unable to delete $($path): $_"^""; }; }; Write-Host "^""Successfully deleted $($deletedCount) items."^""; if ($failedCount -gt 0) { Write-Warning "^""Failed to delete $($failedCount) items."^""; }"
IiI=
Help
How to apply or restore "Clear Outlook logs and telemetry" using commands
- ≈ 2 min to complete
- Tools: Command Prompt
- Difficulty: Medium
- ≈ 3 instructions
- 1
Open Command Prompt
Open Command Prompt as Administrator. - 2
Copy code
Copy the code: - 3
Paste & run
Paste the commands into Command Prompt and press Enter to run.Some changes require a system restart to take effect
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.These plans combine multiple privacy settings, including this one, for stronger protection.
- Clear Outlook data
- Privacy cleanup
This category helps protect your privacy by removing various types of data stored by Microsoft Outlook on your computer. Outlook comes preinstalled on ma...
Same Goal
Other guides in Clear Outlook data See settings that are in the same category as this guide.Using other actions in the same category may help you achieve your goal better.
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
- Audited and verified using automated security tests
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
- Audited and verified using third-party security software
History
We continually monitor our guides, their impact and other potential privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.