Error while Uninstalling SQL Server 2016 instance
Check for the space issues and also the permission on the Temp folder. If the permission is read-only then change it to Full Control.

https://social.technet.microsoft.com/Forums/en-US/bb81cf3f-de94-409e-b1aa-63803632afe4/the-temp-folder-is-on-a-drive-that-is-full-or-is-inaccessible-when-search-service-started?forum=sharepointsearchlegacy