Share this article
Improve this guide
Error While Deleting Key: Fix This Issue With 5 Methods
Everything you need to delete any registry key on your PC
4 min. read
Updated onOctober 4, 2023
updated onOctober 4, 2023
Share this article
Improve this guide
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
Key notes
Deleting andediting registry keysisn’t something you should usually do. However, sometimes it is needed to fix a system error.
Yet, some users are met with Cannot delete key: Error while deleting key prompt while trying to delete a locked registry key. This guide will show you how to fix this error on your PC.
Why can I not delete the registry key?
The reasons you are getting an error while deleting a key on Regedit are not far-off. Below are two major ones:
How do I fix theError while deleting keyissues?
1. Open the Registry Editor as Administrator
The first thing to do if you are getting an error while deleting a registry key is to run Registry Editor as an admin. This is because your PC considers registry key deletion highly privileged.
So, you need to have administrative rights to do it.
2. Edit the Registry Key’s Permissions
If you are getting an error while deleting a registry key, it might be because you don’t have ownership of the key. Following the steps above will give you full control of the keys.
3. Add RegDelNull to Windows
Another possible reason you are getting an error while deleting a key is the activities of the null characters in the key. The RegDelNull will help replace these null characters and help you delete the key easily.
4. Use PSExec
If you still get an error while trying to delete a registry key after changing the permission, you need to use PSExec. This has proved effective for many users. So, you should try it too.
5. Delete the key with Registry DeleteEx
If all the solutions above prove futile in fixing the error while deleting a key prompt, you might need to try an alternative.
One effective program that users have found joy in using is DeleteEx. This tool has a GUI that you can erase locked registry entries.
Furthermore, you can also select to erase all the key’s subkeys. As this software includes more settings, DeleteEx might be a better program for deleting registry entries with than
There you have it: Everything you need to fix the error deleting a key prompt in Windows. Just make sure you follow the instructions carefully, and you should be able to delete your registry keys again.
If you made a mistake and want to knowhow to undo changes on Registry Editor, check our detailed guide to do it quickly.
Feel free to let us know the solution that worked for you in the comments below.
More about the topics:error,windows 10,windows registry
Matthew Adams
Windows Hardware Expert
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things surrounding it.
He is passionate about the tech world, always staying up-to-date with the latest and greatest. With an analytical view, he likes problem-solving, focusing on errors and their causes.
In his free time, he likes to read and write about history and tries to always develop new skills.
User forum
3 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Matthew Adams
Windows Hardware Expert
He is passionate about everything surrounding Microsoft’s OS, focusing on troubleshooting guides & tips for everyday problems.