How to Delete a Service in Windows 7, Vista, or XP

You may need to delete a service when fighting a malware attack

Malware often installs itself as a Windows service in order to load when Windows starts. This allows the malware to run and control designated functions without requiring user interaction. Sometimes, antivirus software removes the malware but leaves the service settings behind. Whether you are cleaning up after an antivirus removal or attempting to remove the malware manually, knowing how to delete a service can help.

Instructions in this article apply to Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.

As of January 2020, Microsoft is no longer supporting Windows 7. We recommend upgrading to Windows 10 to continue receiving security updates and technical support.

Delete the Service You Suspect Contains Malware

The process of deleting a service that you suspect was used to infect your computer with malware is similar in all versions of Windows.

  1. Open the Control Panel.

    Control Panel in Start menu search results
  2. In Windows 10 or Windows 8, select System and Security > Administrative Tools > Services.

    Windows 7 and Vista users select Systems and Maintenance > Administrative Tools > Services.

    XP users select Performance and Maintenance > Administrative Tools > Services.

    Path to Services in Windows 10
  3. Locate the service you want to delete, right-click the service name, and choose Properties. The Properties dialog box for that service will open.

    The right-click menu in Services with Properties highlighted
  4. If the service is still running, select Stop. Highlight the service name, right-click, and select Copy. This copies the service name to the clipboard. Click OK to close the Properties dialog.

    Service Properties dialog box
  5. Open a command prompt as an administrator.

    Screenshot of Administrator Command Prompt
  6. Type sc delete. Then, right-click and choose Paste to enter the service name. If the service name contains spaces, you need to place quotations marks around the name. Examples without and with a space in the name are:

    • sc delete SERVICENAME
    • sc delete "SERVICE NAME"
    Screenshot of "sc delete servicename" in Command Prompt window
  7. Press Enter to execute the command and delete the service. To exit the command prompt, type exit and press Enter.