[postgres@yz200 ~]$ psql -d ambari -U ambari ambari=> delete from servicedesiredstate where service_name like '%SAMPLESRV%'; DELETE 1 ambari=> delete from hostcomponentstate where component_name like '%SAMPLESRV%'; DELETE 3 ambari=> delete from hostcomponentdesiredstate where component_name like '%SAMPLESRV%'; DELETE 3 ambari=> delete from servicecomponentdesiredstate where component_name like '%SAMPLESRV%'; DELETE 3 ambari=> delete from clusterservices where service_name like '%SAMPLESRV%';