Technically, you don't have to uninstall the agent to do an upgrade ... you could upgrade it from the ePO console.
If you really want to remove it, open a command prompt on the system you want to remove the agent and navigate to:
C:\Program Files\McAfee\Common Framework/
C:\Program Files (x86)\McAfee\Common Framework/ (on 64 bit system)
And run the following command:
the problem persists either trying to upgrade or uninstall
Let us know for How many machines you are getting the Error shown in the Screenshot.
I would suggest you to manually uninstall McAfee Agent from one of the machine then deploy the upgarded McAfee Agent from the EPO and then check and update the post.
Please follow KB65863 - to know how to Manually Uninstall McAfee Agent 4.x
Please revert for any queries