Forum Discussion

DevoutSkeptic's avatar
DevoutSkeptic
Tin Contributor
Nov 08, 2026

How to delete a SQL Server instance completely and cleanly?

I'm having some trouble understanding the relationship between a SQL Server connection and an installation of SQL Server.

When I started doing sysadmin kinds of things, I installed SQL Server 2025 on my system twice. (This was due to a misunderstanding of how connections work, which led me to think the first installation had failed.) I have since deleted one of the installations through the SSMS Connect dialog. Now the Connect dialog shows only one SQL Server 2025 connection, and Add or Remove Programs shows only one instance of SQL Server 2025 (I suspect that it always did), but the second instance's subfolder is still present in the C:\Program Files\Microsoft SQL Server\ folder.

So the second instance seems to be uninstalled in one respect, but still present in another. What is the state of this instance? Can I simply delete its subfolder to finish the job, or must I do something else to remove it completely and cleanly?

4 Replies

  • I downloaded and installed SQL Server Installation Center. I must have missed the option to download an ISO, so I did it the old-fashioned way, with an EXE.

    I generated a Setup Discover Report. The report says I have four versions of SQL Server installed, or four features, the distinction hasn't been explained. The fourth has no instance name, and the feature is "LocalDB." I'm not sure what that is... maybe a user mode instance that I didn't ask for but got for free?

    Anyway, I now have the report, but the problem I had with LauraBennett's reply has not been resolved: Installed apps doesn't work as she described, and it's not clear whether it will do something useful or destructive.

    To recap: when I open Settings, there is no Installed apps option. There is Apps > Installed apps, which I assume is what she meant. Within it there's an entry for Microsoft SQL Server 2025 LocalDB, which is interesting but not immediately relevant, and one for Microsoft SQL Server 2025. When I select the latter entry's triple-dot option it opens a menu that has no Remove option, only Modify (disabled) and Uninstall (enabled).

    The obvious interpretation of Uninstall is that it will uninstall Microsoft SQL Server 2025, which is exactly what Add or remove programs offered to do for me, and not what I want. So... I'm still stuck.

  • MW_DEV's avatar
    MW_DEV
    Brass Contributor

    I think there are a couple of things worth clarifying here, especially regarding the different SQL Server installation tools.

    First, Laura is correct that deleting a connection in SSMS does not uninstall a SQL Server instance. Also, the fact that SQL Server Configuration Manager still shows three instances is a good reason to investigate further before deleting anything manually.

    Regarding Programs and Features:

    It still exists in Windows 11, but it's part of the classic Control Panel, not Settings > Apps > Installed apps.

    You can open it directly:

    1. Press Win + R.

    2. Type appwiz.cpl and press Enter.

    3. Find Microsoft SQL Server 2025 (64-bit).

    You mentioned that the three-dot menu in Installed apps doesn't offer Uninstall and that Modify is disabled. This doesn't necessarily mean you're doing anything wrong. However, I would check the classic Programs and Features interface to see whether it provides the appropriate uninstall/change option.

    Regarding SQL Server Installation Center:

    Based on your description of the Basic, Custom, and Download Media options, you're most likely running the SQL Server online/web installer (bootstrapper) rather than the full SQL Server Setup. These are different interfaces. The online installer is primarily used to download the installation files or start a new installation. The full SQL Server Installation Center provides additional options, including Tools and Maintenance. To access it, try searching for SQL Server Installation Center in your Windows Start menu. Alternatively, you can use the online installer you already have:

    1. Launch it and select Download Media.

    2. Download the SQL Server 2025 installation media, preferably as an ISO.

    3. Mount the ISO in Windows. Alternatively, you can extract its contents using 7-Zip or another free archive utility. An ISO is a disk image rather than a ZIP archive, but tools like 7-Zip can open and extract it.

    4. Run setup.exe from the root directory of the mounted or extracted media.

    This should open the actual SQL Server Installation Center, where you can access Tools > Installed SQL Server features discovery report, as Laura suggested.

    Regarding removing the unwanted instance:

    As Laura already explained, you should use the SQL Server removal procedure rather than deleting the installation directory. Once you've identified the correct instance using the discovery report, you can use the uninstall workflow in Programs and Features or SQL Server Setup to remove it. Be particularly careful when selecting the instance and its features, since you have multiple installations on the same machine.

    And one important detail: the presence of an installation directory alone doesn't prove that an instance is still installed. SQL Server can leave files behind after an uninstall. Conversely, deleting those files does not unregister the instance from Windows.

    If the standard removal procedure doesn't work, or the discovery report identifies an inactive installation, Microsoft also documents how to handle partially installed SQL Server instances.

    Relevant Microsoft documentation:

    - https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-installation-wizard-setup 

    - https://learn.microsoft.com/en-us/sql/sql-server/install/uninstall-an-existing-instance-of-sql-server-setup 

    - https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/install/windows/remove-partial-installation 

  • This requires some clarification.

    You speak of SQL Server Installation Center as if it's a distinct application, but according to Microsoft, it's just the software run by the SQL Server installation wizard. "The Installation Wizard runs the SQL Server Installation Center." When I run it, it asks whether I want to do a basic or custom installation or download media; then it asks me to accept the license; then it lets me choose a file location and install. It never displays anything like a menu or button that lets me select "Tools."

    Moving on, I tried opening Installed apps / Programs and Features, but found that it doesn't exist. In case there's a misunderstanding, I'm referring to Settings > Apps > Installed apps; there is no "Programs and Features" subentry there.

    By the way, when I click the triple-dot link in the entry for Microsoft SQL Server 2025 (64-bit), there is no Uninstall/Change item there, either. There's a Modify item, but it's disabled.

    All of this may be unimportant, because I found a partial answer to my question through SQL Server Configuration Manager. The SQL Server Services tab lists the three instances I installed; when I select one and right click Properties>Advanced, Install Path shows the path where the software is installed. The two instances of 2025 are in distinct paths. They are the paths of the folders that I was referring to in the OP when I asked whether I can "simply delete its subfolder to finish the job."

    Which brings me back to that question. I think the answer depends on how Configuration Manager (and presumably other apps) identifies the installed instances. If it scans the folder where those the corresponding subfolders are located, I should be able to delete one and have a clean uninstall. If it does something else, there must be something else I must do to ensure that whatever data it's using is updated.

  • LauraBennett's avatar
    LauraBennett
    Iron Contributor

    Deleting an entry from SSMS’s Connect dialog only removes a saved connection. It does not uninstall the SQL Server instance. Also, one SQL Server entry in Installed apps can represent multiple instances.

    To check what’s installed, open SQL Server Installation Center > Tools > Installed SQL Server features discovery report. SQL Server Configuration Manager’s SQL Server Services section can also show instance services, including stopped ones.

    To remove the unwanted instance:

    1. Back up any databases you need and confirm the exact instance name.
    2. Open Installed apps / Programs and Features, select Microsoft SQL Server 2025, and choose Uninstall/Change > Remove.
    3. In SQL Server Setup, select the unwanted instance and review the features being removed. Keep shared components needed by your remaining instance.

    Don’t delete its folder as the uninstall method. Even after a proper uninstall, database files or other leftovers may remain intentionally. Only remove those after confirming they aren’t needed or used by the instance you’re keeping.