Share via

sql server 2022 uninstall

hussam Mohamed 20 Reputation points
2026-02-20T03:28:39.1033333+00:00

Hi , I am trying to to uninstall sql sever . i got this error TITLE: SQL Server Setup failure.


SQL Server Setup has encountered the following error:

The specified directory, "C:\Program Files (x86)\Microsoft SQL Server", for the INSTALLSHAREDWOWDIR parameter is not valid because this directory is compressed or is in a compressed directory. Specify a directory that is not compressed.

Error code 0x858C001E.

For help, click: https://go.microsoft.com/fwlink?LinkID=2209051&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&EvtType=0xFDC38F1F%25400x2AF6EB74%25401420%254030


BUTTONS:

OK


i did the decompression but still same error ?

SQL Server Database Engine
{count} votes

Answer accepted by question author
  1. Akhil Gajavelly 1,560 Reputation points Microsoft External Staff Moderator
    2026-02-20T06:41:18.9433333+00:00

    Hi @hussam mohamed ,

    This error happens because Program Files (x86) (or one of its parent folders) is still NTFS compressed even if the SQL folder itself looks uncompressed.

    Please do this:

    1. Go to C:
    2. Right-click Program Files (x86)
    3. Properties - Advanced

    Make sure “Compress contents to save disk space” is unchecked

    Click Apply to this folder, subfolders and files

    If it was already unchecked, open Command Prompt as Admin and run:

    compact /U /S:"C:\Program Files (x86)"
    

    Then reboot once and try uninstall again.

    This usually resolves error 0x858C001E during SQL Server 2022 uninstall.

    Thanks,
    Akhil.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-02-20T03:28:48.3133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error you are encountering indicates that the directory specified for the INSTALLSHAREDWOWDIR parameter is either compressed or located within a compressed directory. Even if you have attempted to decompress it, the setup may still be detecting it as compressed. Here are some steps you can take to resolve this issue:

    1. Check Directory Properties: Right-click on the directory C:\Program Files (x86)\Microsoft SQL Server\, select Properties, and ensure that the "Compress contents to save disk space" option is unchecked.
    2. Choose a Different Directory: If the problem persists, you might want to specify a different directory that is not compressed for the INSTALLSHAREDWOWDIR parameter during the uninstallation process. You can create a new directory, for example, C:\SQLServerShared\, and use that path.
    3. Run as Administrator: Make sure you are running the uninstallation process as an administrator, as insufficient permissions can sometimes lead to errors.
    4. Check for Other Instances: Ensure that there are no other instances of SQL Server running that might be interfering with the uninstallation.
    5. Use Command Prompt: If the graphical interface continues to fail, consider using the command prompt to uninstall SQL Server. You can use the appropriate parameters to specify the installation directories.

    If these steps do not resolve the issue, you may need to consult the SQL Server error logs for more detailed information about the failure.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.