While running the uninstaller for Agent for SharePoint don't remove the Registry Entries.
Footprints of the SharePoint files still existing because of the installed user id is different and uninstalled user id is something else. This depend on the type of the user installing / uninstalling the WebAgent.
To remediate this unclean removal.
1. Install the SharePoint / WebAgent in the same location as earlier to overwrite the existing files
2. Execute the uninstallation should be successful with clean removal for file residues.