BESClient uninstall Error for Redhat linux

Tired …

i am uninstall the BESClient on linux without stoping the BESClient service,
and i already remove all these directories using this command,

rm -rf /etc/opt/BESClient/ /var/opt/BESClient

after the uninstall BESClient i check the BESClient status ,so the error is

[root@linuxserver Desktop]# service besclient status
Redirecting to /bin/systemctl status besclient.service
● besclient.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

and

when i again install the BESClient, The terminal display this Package is Already Install but the service status is

[root@linuxserver Desktop]# rpm -ivh /root/Desktop/Client/BESAgent-9.5.4.38-rhe5.x86_64.rpm
Preparing… ################################# [100%]
package BESAgent-9.5.4.38-rhe5.x86_64 is already installed

Anyone can please guide me …
i am very thankful to you …

Forgive my silly question, but why in the world would you remove the agent that way? If you delete the binaries (without stopping the service no less), the try to re-install the agent like that, this is what you will get. Use rpm to do the uninstall, then do directory cleanup if you have to.

rpm -ev --noscripts BESAgent-9.5.4.38 -or- rpm -ev --noscripts /root/Desktop/Client/BESAgent-9.5.4.38-rhe5.x86_64.rpm

Would not normally use ‘–noscripts’, but I don’t know what you did by deleting the files like that.

…then run your re-install.

Yes that method of removal left service scripts behind that are in OS locations and also left the RPM db saying the package is installed

Always use rpm -e <packagename> to remove a package