Core component of SQL Server for storing, processing, and securing data
When you try to remove a SQL Server 2012 instance but get an “install location unavailable” error, it means Setup can’t find the original MSI files in the Windows Installer cache. To fix this without rebuilding the VM, follow these steps:
Obtain the exact SQL Server 2012 installation media
Download the same edition (Express, Standard, etc.) ISO or installer package you originally used.
If you only have a service pack or CU, extract it (e.g., SQLServer2012SP4-KB2979597-x64.exe /X C:\SQL2012SP4).
Place the extracted files in a local folder, e.g., C:\SQL2012Media.
Restore missing installer cache files (if needed)
SQL Server stores stripped-down MSI/MSP files under %windir%\Installer. If those are missing, you can use Microsoft’s FixMissingMSI tool to recache them:
a. Download FixMissingMSI from the SQL Setup ToolSuite GitHub.
b. Run FixMissingMSI.exe, point it to C:\SQL2012Media, and click Fix All.
c. This repopulates %windir%\Installer with the original MSI/MSP files required for uninstall and service-pack removal.
Launch the SQL Server Setup in Remove-Instance mode
a. Open an elevated Command Prompt and navigate to C:\SQL2012Media.
b. Run:
text
Setup.exe /ACTION=Uninstall /FEATURES=SQL /INSTANCENAME=<YourInstanceName>
c. When prompted for media source, browse to C:\SQL2012Media so Setup can locate the MSI files.
Alternative: Use Control Panel → Programs & Features
a. Open Programs and Features, select Microsoft SQL Server 2012, and click Uninstall/Change.
b. In the SQL Server Installation Center, go to Maintenance → Remove.
c. When it asks for missing installation files, click Select Installation Media Root Directory and browse to C:\SQL2012Media (the folder containing the original Setup MSI).
d. Continue through the wizard to remove the instance.
Clean up residual components (if any remain)
- After uninstall, verify no SQL Server 2012 services exist under Services.msc.
- Optionally delete leftover registry keys and folders: %ProgramFiles%\Microsoft SQL Server\ (rename or delete folders for the 110.* instance)
- Registry: HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\110 HKLM\SYSTEM\CurrentControlSet\Services\MSSQL$<YourInstanceName>
- Reboot and verify removal.
- Restart the server.
- Confirm the instance is gone via sqlcmd -L or SQL Server Configuration Manager.
By restoring the missing MSI cache and pointing Setup to the original media, you can cleanly uninstall the SQL Server 2012 instance without redeploying the VM.
If you found these steps helpful, please give this answer a Like. Mark it as the Accepted Answer, which helps other users know this solution resolved the problem.