Recently we have added target with wrong name hence it was required to deinstall OEM12c agent and associated targets from OMS repository.
Below steps would help you to perform this activity.
1. Deinstall agent from host/target
Export EM Agent HOme
$export EMAGENT_HOME=/u01/app/oracle/product/emagent/core/12.1.0.5.0
Deinstall Agent
$perl $EMAGENT_HOME/sysman/install/AgentDeinstall.pl -agentHome $EMAGENT_HOME