How to Delete a Windows Service (Safe Steps)
In this article
To delete a Windows service, open Command Prompt as Administrator and run sc delete ServiceName (replace ServiceName with the actual service name). This permanently removes the service entry from the registry. You need administrative rights, and you should stop the service first. Below are detailed steps, plus what to do if the command fails.
What You'll Need
- An account with Administrator privileges on the Windows PC.
- The exact name of the service you want to delete (not the display name, though they can be the same).
- Optional: a backup of the registry or a system restore point, in case you make a mistake.
Step-by-Step
- Find the exact service name. Press Win + R, type
services.msc, and press Enter. In the Services window, locate your service. Double-click it to open Properties. The "Service name" field (not "Display name") is what you need. Write it down exactly, including case and spaces (though spaces are rare). - Open Command Prompt as Administrator. Click the Start button, type
cmd, right-click "Command Prompt" and select "Run as administrator". If prompted by User Account Control, click "Yes". - Stop the service (if it is running). In the Command Prompt, type
net stop ServiceNameand press Enter. ReplaceServiceNamewith the exact name from step 1. If the service is already stopped, you'll see a message saying so. If the service cannot be stopped (e.g., it's a system component), you may not be able to delete it—see Troubleshooting. - Delete the service. Type
sc delete ServiceNameand press Enter. You should see a success message: "[SC] DeleteService SUCCESS". - Verify the deletion. Close the Command Prompt, reopen the Services window (or refresh it with F5), and confirm the service is no longer listed. Also, you can run
sc query ServiceNamein the Command Prompt—it will return an error stating the service does not exist.
Common Mistakes
- Using the display name instead of the service name. The
sc deletecommand requires the internal service name, not the friendly display name. For example, "Windows Update" is the display name, but the service name iswuauserv. - Forgetting to run as Administrator. If you run Command Prompt without admin rights, you'll get an "Access is denied" error. Always right-click and choose "Run as administrator".
- Typing the service name with spaces or extra characters. Service names usually have no spaces. If the name has a space, you must enclose it in quotes, e.g.,
sc delete "My Service". - Deleting a service that is still in use. If the service is required by Windows or another application, deleting it can cause instability. Make sure you know what the service does before removing it.
- Not stopping the service first. While
sc deleteoften works on a running service, it's safer to stop it first. Otherwise, the service may restart or cause errors until the next reboot.
Tips
- Create a restore point before deleting. Go to Start, type "Create a restore point", select your system drive, and click "Create". This lets you undo the deletion if something goes wrong.
- Use PowerShell as an alternative. You can also open PowerShell as Administrator and run
Remove-Service -Name ServiceName(this cmdlet is available in Windows 10 and 11). Thesccommand works in both Command Prompt and PowerShell. - Export the service's registry key first. Open Regedit, navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName, right-click it, and choose "Export". Save the .reg file. If you need to restore, double-click the file. - Check for third-party service managers. Tools like Autoruns (from Microsoft Sysinternals) can also remove services, but the built-in
sccommand is just as effective and doesn't require extra downloads.
Troubleshooting
- "Access is denied" error. You are not running as Administrator. Close the Command Prompt and reopen it with "Run as administrator". If your account is not an admin, you'll need to log in with an admin account or ask the admin to do it.
- "The specified service does not exist as an installed service." You typed the wrong service name. Double-check the exact name in services.msc. Remember it's case-insensitive but must be spelled correctly.
- "The service cannot be deleted because it is a driver or system service." Some services are protected by Windows. You may need to change the registry permissions or use Safe Mode. However, deleting critical system services is risky and can break Windows. Only do this if you are absolutely sure it's safe.
- Service reappears after reboot. The service is likely being recreated by its parent application or driver. You need to uninstall the software that installed the service first, then delete the service again.
- "The service is marked for deletion." This happens when the service is still running or has open handles. Stop the service, wait a few seconds, and try again. If it persists, reboot and try again immediately after startup.
- If you accidentally delete a Windows service. Restore the registry key you exported, or use System Restore. If you don't have a backup, you may need to repair Windows using the installation media.
Frequently Asked Questions
Can I delete a service without admin rights?
No. Deleting a service modifies the Windows registry, which requires Administrator privileges. You must run the command prompt as an administrator.
What's the difference between service name and display name?
The service name is the internal identifier used by Windows (e.g., wuauserv). The display name is what you see in the Services list (e.g., "Windows Update"). The sc delete command uses the service name.
Will deleting a service uninstall the program?
No. Deleting the service only removes the service entry. The program files remain on disk. You should uninstall the program through Settings > Apps or Control Panel to remove everything cleanly.
Is it safe to delete a service from a third-party app?
Generally yes, if the app is no longer installed or you no longer need it. But if the app is still installed, deleting the service may cause errors. Uninstall the app first, then check if the service is still present.
Can I delete a Windows built-in service?
Technically yes, but it is not recommended. Many built-in services are essential for system stability. Deleting one can cause boot failures or feature malfunctions. Only do this if you have a specific reason and a backup.
What if the service is protected by TrustedInstaller?
You may need to take ownership of the registry key and grant yourself full control before you can delete it. This is advanced and risky. Better to avoid deleting protected services unless absolutely necessary.