Clean removal of system apps

Here are steps to Clean removal of system apps (bypass error 0x80073CFA) :

  1. Try removing the system package using Remove-AppxPackage
    Remove-AppxPackage cortana windows 10
  2. Run cmd as SYSTEM using PsExec ( in an elevated command prompt psexec -i -s cmd
  3. Copy %ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd to the Desktop (do make a backup)
    copy %ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd %USERPROFILE%\Desktop
  4. Toggle IsInbox to 0
    Remove-AppxPackage cortana windows 10 pcuninstall cortana windows 10
  5. Kill sihost.exe and the svchost.exe instance that shares the same PID as the StateRepository service (cannot be stopped via usual methods)
    taskkill /im sihost.exe /f
    FOR /F "usebackq tokens=2 skip=2" %i IN (`tasklist /svc /fi "services eq StateRepository"`) DO taskkill /PID %i /f
  6. Ignore the warning window, note that Start Menu will not work until reboot
    uninstall cortana windows 10 pc
  7. Delete %ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.* (including the SQLite temp files). This would not work until step 5 is done properly.
    del %ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.*
  8. Copy the edited StateRepository-Machine.srd to %ProgramData%\Microsoft\Windows\AppRepository\
    copy %USERPROFILE%\Desktop\StateRepository-Machine.srd %ProgramData%\Microsoft\Windows\AppRepository\
  9. Restart the StateRepository service and try removing the system package again
    sc start StateRepository

    uninstall cortana windows 10 pc 2

  10. Reboot to restore the Start Menu


Leave a Reply

Your email address will not be published. Required fields are marked *