Windows how to remove windows service

Use the SC command, like this (you need to be on a command prompt to execute the commands in this post):

SC STOP shortservicename
SC DELETE shortservicename

Note: You need to run the command prompt as an administrator, not just logged in as the administrator, but also with administrative rights. If you get errors above about not having the necessary access rights to stop and/or delete the service, run the command prompt as an administrator. You can do this by searching for the command prompt on your start menu and then right-clicking and selecting «Run as administrator». Note to PowerShell users: sc is aliased to set-content. So sc delete service will actually create a file called delete with the content service. To do this in Powershell, use sc.exe delete service instead


If you need to find the short service name of a service, use the following command to generate a text file containing a list of services and their statuses:

SC QUERY state= all >"C:\Service List.txt"

For a more concise list, execute this command:

SC QUERY state= all | FIND "_NAME"

The short service name will be listed just above the display name, like this:

SERVICE_NAME: MyService
DISPLAY_NAME: My Special Service

If you want to make sure you are using the right name you can run:

SC QUERY MyService

If the name is right it will display some info about it; otherwise it will give an error.

And thus to delete that service:

SC STOP MyService
SC DELETE MyService

If you are a fan of tweaking your system and disabling services, you might find that over time your Windows Services list becomes large and unwieldy. It’s easy enough to delete a Windows service using the Command Prompt or Registry editor.

Before you remove a service, you need to understand a few points:

When you delete a service, it will disappear forever from the system, and it is not easy to restore it, and in some cases it is simply impossible.

Removing certain services can cause the inactivity of certain programs. Therefore, you should not delete the service if you are not 100% sure what it is responsible for.

Do not remove the Windows 10 system services, as this may lead to the inoperability of the entire system.

You also need to understand when it is necessary to remove the Windows service:

Frequently, programs when uninstalled leave their services intact, and every time the computer starts up, the system tries to start such a service, but due to the lack of executable or library files, it cannot do so, generating an error.

Some viruses and trojans to disguise their destructive actions can create a new service in the system.

And even if your antivirus removes the body of the virus, the service may remain, and you will have to manually remove it.

It is also possible that the system performance decreases due to the large number of processes running as services, and you decide to remove (and not just stop) a number of unnecessary services in Windows 10.

1. Open Services With Help of Windows Search Box

Hit Start, type “services” into the search dialog box, and then click the “Services” to get a list of services.

2. Find the Service and Move to Properties

In the “Services” window, scroll down and find the service you’re after. Right-click the service and choose the “Properties” command.

3. The next Step Is to Copy the Service Name

In the service’s properties window, copy (or write down) the text to the right of the “Service name” entry.

4. Open Command Line With Administrative Privileges

Click Start, and then type “cmd” into the search box. Right-click the “Command Prompt” result, and then choose the “Run as administrator” command.

5. Input and Execute Following Command

At the Command Prompt, you’ll use the following syntax:

sc delete ServiceName

So, to delete the “RetailDemo” service we’re using in our example, we’d type the following text, and then hit Enter:

sc delete RetailDemo

6. Start Windows Registry Editor

Start Regedit.exe and navigate to the following branch:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

7. Delete Service with Help of Regedit.Exe

Each sub-key under the above registry key represents a driver or a Service. The key name is also the short name of the service. Also, you should be able to identify the entry easily by looking at the DisplayName and ImagePath values in the right-pane in the Registry Editor. Find the entry you want to delete. Right-click the appropriate key, and choose Delete. Exit the Registry Editor.

Consider Using Action1 to Delete Windows Service if:

  • You need to perform an action on multiple computers simultaneously.
  • You have remote employees with computers not connected to your corporate network.

Action1 is a cloud-based platform for patch management, software distribution tools, remote desktop, software and hardware inventory, endpoint management, and reporting.

Windows services play a vital role for any working Windows feature to run without user intervention. These services are known as background services and many Windows features, software, and applications depend on these background services. Disabling this service will result in breaking their respective feature or software. Sometimes you may find Background services running in Windows and consume System resources. Background services in Windows refer to programs or processes that run in the background without user interaction. These services automatically start even after the system Restart, and for some services, you can’t find the stop option to kill that service. In case any service consumes a lot of system resources, and if you confirm that service is not a critical service, then you can delete that Windows service, this article will guide you to remove Windows Service in Windows 11.

You can remove Windows Service in Windows 11 using three different methods, follow the below-mentioned methods to remove the Windows service safely.

Method 1: Using Command Prompt

Open Command Prompt in elevated mode, click on the start menu, search for Command Prompt, right-click on it, and choose Run as administrator.

Run the following command to list out all services.

sc queryex type=service state=all

Next, execute the following command.

Sc delete <service-name>

remove Windows Service

This command will delete the specific service and it’s removed the service from your system.

Method 2: Using Windows Terminal

Launch Windows Terminal in elevated mode and choose PowerShell.

Type the following command to list out all Windows Services.

Get-Service

To Delete a specific Windows Service, type the following command.

Remove-Service -name "<Service name>"

This command will delete the specific Windows Service.

Method 3: Using Registry Editor

Open Run command by pressing Windows + R and type regedit and hit enter, this command will open the Registry Editor console.

Now navigate to the following Registry path.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

From the left-hand side, expand the Services registry key, under the Services registry key you can find all the Windows Services registry keys.

Each Registry key sub-key corresponds to a service. You can identify the registry key for a service using DisplayName value.

Once you confirm the Service name with the Help of DisplayName value from the right pane, right-click on the Registry key and choose Delete, click Yes for the Confirmation.

Using Registry Editor

Once done, close the Registry Editor and restart the system once. That’s it you have successfully removed the Windows Service.

Read Also:

How to Delete a Windows Services using Registry or command-line?

Add windows Services to control panel in Windows 10

How to Start-Stop windows services using CMD?

Sometimes, we may need to remove Windows services installed on our PCs. For example, we may want to delete orphaned services left over after uninstalling the application running them, or you may want to delete Windows Services simply because you don’t need them.

This article discusses how to remove Windows services safely, and it is structured as follows – Section 1 discusses how to list installed services, Section 2 identifies services that are safe to remove without breaking your computer, and the last Section discusses how to remove the services we don’t want anymore.

Listing Installed Windows Services using PowerShell

The Get-Service cmdlet gets all the services in the computer. The cmdlet, by default, lists the services with three properties – Status, Name, and DisplayName.

Note that the Name property is an alias for ServiceName; therefore, we will use the two names interchangeably throughout the post. It is the property we will use most in this article to identify services.

You can also filter the services. The following commands filter items with the string “ssh” in them.

GetService Name «*ssh*»

Heads up! What Services are Safe to Stop or Delete?

Windows services can be divided into two – Microsoft services and third-party.

Most Microsoft services are not safe to be stopped or uninstalled. Any attempt to do that can crash your PC (There are a few you can remove without a serious problem).

On the other hand, most third-party services can be removed without a big problem, but you need to be careful in a few cases (we will mention them shortly).

You can identify core Windows services and third-party ones using System Configuration App.

Search for the app on the Start Menu and open it.

On the app, select the Services tab on the navigation bar, and hide the Microsoft services by checking the box at the bottom of the page. Whatever remains on the list at this point are third-party services.

The only third-party services you should not remove or stop are the ones with the words intel, display, wireless, or graphics. Intel-tagged services control many core functions of your PC; wireless services are essential for running your wireless connections; display controls the monitor behavior, and graphics are essential for the workings of graphic cards – the GPUS.

Now that we know what is safe to remove, let’s learn how to delete what we don’t want.

There are two tools you can use in this case

  • sc command line tool, and
  • Get-WmiObject native cmdlet
  • Remove-Service cmdlet for PowerShell version 6 and above

Using the sc legacy command line utility to delete Windows service

The general syntax for removing Windows Service using sc.exe is given by:

where <service_name> is the Name of the service, not DisplayName.

Note: For older versions of PowerShell (tested on PowerShell 5.1.22), you may need to run the service control tool (sc) with the extension, that is, sc.exe. This is because sc is an alias for the Set-Content cmdlet on older PowerShell. In a newer PowerShell (tested on PowerShell 7.3.2), the alias is removed; therefore, you can simply use the command tool as sc.

Let’s identify the service we want to remove using Get-Service. In particular, let’s remove a PostgreSQL service.

GetService Name «*postgre*»

Then we can delete the service using the sc command utility.

Note: You need to run PowerShell with Admin privileges to be able to delete a service with the sc tool; otherwise, you will get the following error.

[SC] OpenService FAILED 5:
Access is denied.

sc delete postgresqlx6414

Output:

[SC] DeleteService SUCCESS

And use the following line on older PowerShell; you run

sc.exe delete postgresqlx6414

Use Get-WmiObject native cmdlet

Here is an example of deleting a service using this cmdlet

$service = GetWmiObject Class Win32_Service Filter «Name='<service_name>»

$service.delete()

Delete Windows service using the Remove-Service cmdlet

Remove-Service is available on PowerShell 6.0 and later. You can use it with this simple syntax.

RemoveService Name <service_name>

That works with the Name property only. If you want to use the DisplayName, you can use the following command.

GetService DisplayName «Service Name» | RemoveService

In the command above, the Get-Service cmdlet is used to fetch services with the “Service Name” string on the DisplayName, then pipe the result to Remove-Service to be removed.

Conclusion

This article discussed removing a Windows Service using the sc command utility, Get-WmiObject native cmdlet, and Remove-Service cmdlet. The latter is only available on PowerShell 6.0 and newer.

Have you come across a situation where uninstalling software leaves its Service or driver entries in the registry, and Windows tries to load them at every boot, fails, and logs the error to the System Event log at every startup?

This article tells you how to delete an orphaned service in Windows 10 (and earlier) using the registry, SC.exe command-line, PowerShell, or Autoruns. Before proceeding further, create a System Restore Point and take a complete Registry backup.

If you find that no dependents exist for a service, you can delete the leftover or unwanted Service in Windows using one of the following methods.

Contents

  1. Delete a Service in Windows
    • Method 1: Using the SC.EXE command
    • Method 2: Using Autoruns
    • Method 3: Using the Registry Editor
    • Method 4: Using PowerShell
    • Method 5: Using Process Hacker
  2. INFO: View Dependents of a Service

You can delete a service using the built-in SC.exe command-line, the Registry Editor, PowerShell, or a utility like Autoruns. Follow one of these methods:

Using the SC command

The SC.EXE command-line tool in Windows can be used to create, edit, or delete Services. To delete a service in Windows, use the following command-line syntax from admin Command Prompt:

sc delete service_name

Where service_name refers to the short name of the service, instead of its display name. To find the short name, open Services MMC and double-click a service.

  • Example 1: Google Update Service (gupdate) is the display name, and gupdate is the short name.
  • Example 2: Dell SupportAssist (SupportAssistAgent) is the display name, and SupportAssistAgent is the short name.
    service short name services mmc

Another way to find the short name of a service is by using this command-line:

sc query type= service | more

The above command lists all the services along with the service (short) name and the display name.

Or, if you know the display name, you can find the service name using this command:

sc getkeyname "service display name"

which in this example is:

sc getkeyname "Google Update Service (gupdate)"

delete a service in windows - leftover service

Once the service short name is obtained using any of the above methods, use this command to delete the Service:

sc delete test

You’ll see the output: [SC] DeleteService SUCCESS

delete a service in windows - leftover service

This deletes the specified service (“test” service in this example) from the computer.

If the service is running or another process has an open handle to the service, it will be marked for deletion and removed on the next reboot.

Can’t delete a service?

If you receive the following error when deleting the service, it could also be possible that you’re trying to delete a service from a normal Command Prompt instead of an admin Command Prompt.

Should the same error occur in an admin Command Prompt, then it means that the currently logged on user account doesn’t have full control permissions for that service.

[SC] OpenService FAILED 5:
Access is denied.

To resolve this error when deleting a service, you need to modify the Service permissions first. Alternatively, you can use the SYSTEM or TrustedInstaller account to delete the service.


Using Autoruns from Windows Sysinternals

Autoruns, from Microsoft Windows Sysinternals, is a must-have tool that helps you manage Windows startup, services, drivers, Winsock providers, Internet Explorer add-ons, Shell extensions, etc.

  1. Download Autoruns and run it
  2. From the Options tab, tick Hide Microsoft Entries so that only the third-party entries are listed.
  3. Press F5 to refresh the listing.
  4. Click the Services tab to delete the service(s) that are unwanted or leftover.
    Delete unwanted services
  5. Close Autoruns.

Using the Registry Editor

To manually delete a service directly via the Windows Registry, use these steps:

  1. Start Regedit.exe and navigate to the following branch:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

    delete a windows service registry editor

    Dell SupportAssist service registry key

    Each sub-key under the above registry key represents a driver or a Service. The key name is the same as the short name of the service. Also, you should be able to identify the entry easily by looking at the DisplayName and ImagePath values in the right pane in the Registry Editor.

  2. Find the entry you want to delete.
  3. Backup the appropriate key by exporting it to a .reg file.
  4. Once exported, right-click the key, and choose Delete.
  5. Exit the Registry Editor.

Using PowerShell

From the PowerShell administrator window, you can use the following commands to delete a service.

$service = Get-WmiObject -Class Win32_Service -Filter "Name='servicename'"
$service.delete()

delete a service in windows - powershell

ReturnValue of 0 indicates that the operation was successful. The service is deleted and will no longer show up in the Services MMC.

To know the meaning of a return value, check out the Microsoft article Delete method of the Win32_Service class

delete a service in windows - leftover serviceOr you can run the sc.exe command in PowerShell. That would work too. But you need to specify the extension (sc.exe) when running it in PowerShell. This is because the command SC (without mentioning the extension .exe) will be interpreted as Set-Content which is a built-in cmdlet in PowerShell.

It’s even easier if you have PowerShell 6.0 installed. In PowerShell 6 and higher, you can use this syntax to remove a service:

Remove-Service -Name ServiceName

Running the Remove-Service command in older versions of PowerShell (<6.0) shows the error: The term ‘Remove-Service’ is not recognized as the name of a cmdlet, function, script file, or operable program.


Using Process Hacker

Process Hacker is a good process management utility that is similar in appearance to Microsoft’s Process Explorer. With Process Hacker, you can easily delete a service via the right-click menu.

delete a windows service process hacker

Delete a service using Process Hacker. e.g., Dell SupportAssist service

Start Process Hacker as administrator. Switch to the Services tab, right-click on the service you want to remove, and click Delete.

(As a side note, you can also configure service permissions using Process Hacker.)

Download Process Hacker from https://processhacker.sourceforge.io/


View Dependents of a Service

When you remove a service, others that depend upon the service will fail to start, returning the error “System error 1075 has occurred. The dependency service does not exist or has been marked for deletion.”. When a driver or service entry is leftover in the registry, but the corresponding files are missing, the Event Log would record an entry with ID:7000 at every start.

Log Name: System
Source: Service Control Manager
Date:
Event ID: 7000
Level: Error
Description:
The DgiVecp service failed to start due to the following error:
The system cannot find the file specified.

So, it’s advisable first to check if there are any dependents. You can check that in Services MMC by double-clicking on the item you’re going to delete and clicking the Dependencies tab. The list of components that depend on that service is shown below. Here is an example where “Fax” depends on “Print Spooler” to start.

Delete unwanted services

While most third-party services don’t have any dependents, some do. It’s always advisable to take a look at this tab before clearing the item.

Another way to verify the dependents is to run this command from a Command Prompt window. (example, Print Spooler)

sc enumdepend spooler

Delete unwanted service in windows

The information in this article applies to all versions of Windows, including Windows 11.


One small request: If you liked this post, please share this?

One «tiny» share from you would seriously help a lot with the growth of this blog.
Some great suggestions:

  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!

So thank you so much for your support. It won’t take more than 10 seconds of your time. The share buttons are right below. :)


  • Windows hello в windows 10 как включить камеру
  • Windows how to make service
  • Windows hlp пример программного приложения
  • Windows hd color скачать кодеки
  • Windows how to enable telnet