Software⏱️ 3 min read📅 2026-06-03

How to Fix: How to solve "The specified service has been marked for deletion" error

How to fix The specified service has been marked for deletion error in Windows

Quick Answer: The error indicates that the service has been marked for deletion by another process. Try using the "sc config" command to remove the service from the registry.

The 'specified service has been marked for deletion' error occurs when you attempt to delete a Windows Service using the sc delete command, but the service is still in use or has pending actions. This error affects users who are trying to remove unwanted services from their system.

This error can be frustrating as it prevents you from deleting the service and can lead to system instability. In this guide, we will walk through the steps to resolve this issue and provide alternative solutions.

⚠️ Common Causes

  • The primary reason for this error is that the service is still in use or has pending actions, preventing it from being deleted. This can occur when the service is running in the background, or there are other processes using its resources.
  • An alternative reason for this error could be if the service is not properly uninstalled before attempting to delete it. This can happen if the uninstallation process fails or is interrupted.

🚀 How to Resolve This Issue

Force Service Termination

  1. Step 1: Stop the service using the sc stop command: sc stop
  2. Step 2: Wait for a few seconds to allow any pending actions to complete.
  3. Step 3: Verify that the service has stopped using the sc queryex command: sc queryex "<service name>"
  4. Step 4: Attempt to delete the service again using the sc delete command: sc delete

Manually Remove Service Files

  1. Step 1: Locate the service files in the Windows directory (usually C:\Windows\system32 or C:\Windows\System32):
  2. Step 2: Delete the service files manually using a file explorer or command prompt: del /f /q
  3. Step 3: Verify that the service has been deleted by checking the sc queryex command result.
  4. Step 4: Attempt to delete the service again using the sc delete command if necessary.

💡 Conclusion

To resolve the 'specified service has been marked for deletion' error, try force terminating the service or manually removing the service files. If these methods do not work, you may need to seek additional assistance from a system administrator or Microsoft support.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions