After installing or upgrading the agent you find a script error indicating a failure for PREUN or any other script.
Red Canary Linux EDR
run the following command:
$ rpm -e --noscript <file name>
-e : removes package from the system. removes all traces of package from the RPM database.
--noscript : does not execute pre- and post-uninstall scripts
On failure the yum command may not be able to fully remove the package.