Skip to content
Windows

How to Enable or Disable Deleting Diagnostic Data in Windows 11

Richard
Written by
Richard
Updated 4 min read
Close-up Windows Registry Editor with highlighted entry
Close-up Windows Registry Editor with highlighted entry
Before you start
  • 5 steps
  • Needs administrator rights
  • Group Policy needs Windows 11 Pro, Enterprise or Education
  • Includes a restart or sign-out

Deleting diagnostic data in Windows 11 clears the system info and activity logs that Windows stores on your computer and sends to Microsoft. Windows keeps these files to fix bugs and make the operating system safer. By default, any user can clear that history from Settings. The two methods below let you block that, or put it back the way it was.

You need to sign in as an administrator to change this setting. Both methods affect the whole PC, not just your own account.

⚡ Quick Answer

You can enable or disable deleting diagnostic data in Windows 11 using the Local Group Policy Editor or Registry. For Pro, Enterprise, or Education editions, open gpedit.msc and navigate to Data Collection. For other editions, use the Registry Editor with administrator privileges and modify the DisableDeviceDelete value.

Advertisement

Option One

Enable or Disable Deleting Diagnostic Data in Local Group Policy Editor

Local Group Policy Editor controls whether users can delete the diagnostic data that Windows 11 sends to Microsoft. You change one policy setting to turn the delete option on or off. The editor is only included in Windows 11 Pro, Enterprise, and Education. On Windows 11 Home, search for it and you will find nothing, so use the Registry method further down.

  1. Open the Start menu and search for gpedit.msc. Open the result named Local Group Policy Editor. The editor opens with a folder tree on the left and settings on the right.
  2. In the left pane, expand the folders until you reach the path below. Click the last folder to select it.
    Computer Configuration > Administrative Templates > Windows Components > Data Collection and Preview Builds
Disable deleting diagnostic data setting in Windows 11.
Disable deleting diagnostic data setting in Windows 11.
  1. In the right pane, double-click Disable deleting diagnostic data. A settings window opens with three options: Not Configured, Enabled, and Disabled.
  2. Pick the option you want, then click OK. The two choices that matter are listed below.

To Enable Deleting Diagnostic Data (Default):

  • Select Not Configured.
  • Click OK.
Advertisement

To Disable Deleting Diagnostic Data:

  • Select Enabled.
  • Click OK.

The wording is easy to mix up. The policy is called “Disable deleting diagnostic data”, so setting it to Enabled switches the delete option off. Not Configured returns Windows to its default, where deleting is allowed.

Windows 11 Group Policy Editor options for diagnostic data deletion.
Windows 11 Group Policy Editor options for diagnostic data deletion.
  1. Close the editor when you are finished.

The change usually applies on its own within a short time. If it doesn’t, sign out and back in, or restart the PC. To check the result, go to Settings Privacy & security > Diagnostics & feedback. When deleting is blocked, the Delete diagnostic data button should be unavailable. To undo the change, open the same policy and select Not Configured.

Advertisement

Option Two

Enable or Disable Deleting Diagnostic Data using Registry

The Registry method works on every edition of Windows 11, including Home. It adds or removes a registry value that controls the same setting as the policy above. You apply it with a command from an elevated Command Prompt, so you don’t need to browse through Registry Editor by hand.

Before you start, open the Start menu, search for Command Prompt, and choose Run as administrator. Click Yes if User Account Control asks for permission. Then paste in one of the commands below and press Enter. A message saying the operation completed successfully means it worked.

To Enable deleting diagnostic data (Default), run this command:

🗝️Registry
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v DisableDeviceDelete /f

To Disable deleting diagnostic data, run this command:

🗝️Registry
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v DisableDeviceDelete /t REG_DWORD /d 1 /f

Sign out and back in, or restart the PC, so Windows picks up the change. If you made a mistake, run the Enable command to go back to the default.

Summary

You can manage this setting through either the Local Group Policy Editor or the Registry. By default, Windows lets you delete diagnostic data. Blocking that option keeps the history on the machine, and standard users cannot clear it. Both methods are fully reversible.

Frequently asked questions

What can I do if the Diagnostic Policy Service is disabled?

Start the service from the Services app. Open Services, double-click Diagnostic Policy Service, set Startup type to Automatic, select Start, then click OK. Windows uses this service to troubleshoot problems, so leaving it stopped can break the troubleshooters. If it won't start, restart the PC and try again.

How do I disable telemetry in 🪟 Windows 11?

Turn off Optional diagnostic data in Settings. Open Settings, go to Privacy & security, select Diagnostics & feedback, and switch off Optional diagnostic data. Windows still sends required data, and you cannot turn that off on Home or Pro. On Enterprise and Education, Group Policy can set it lower.

How to run a complete diagnostic on 🪟 Windows 11?

Run Windows Memory Diagnostic to test your RAM, which is the main full check built into Windows. Press Win+R, type mdsched.exe, and press Enter. Choose Restart now and check for problems. The PC restarts and runs the test. Results appear in Event Viewer after you sign in. For drives and other hardware, use the manufacturer's tool.

Should I have diagnostic data on or off?

Leave Required diagnostic data on, because Windows needs it to stay secure and updated. Optional diagnostic data is your choice. Turn it on if you want to help Microsoft fix bugs and improve features. Turn it off if you want to send less information. Neither choice will break Windows.

Still have a question?

Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.

Tags: #Windows 11

Did this guide fix your problem?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.

Advertisement

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *