Please see the screenshot. The image on the left says existing x installation found at /opt/xThe image on the right shows the terminal where I attempt to delete the same directory. The terminal on the right shows sudo rm -f -r -d /opt/x and it has no output. ls also doesnt show /opt/x. Is anybody able to figure out what's going on here? ls shows no such directory and rm doesnt seem to remove it, yet the application manages to find something. FWIW, I was trying to remove a Postgresql component. Should I also post this in dba.stackexchange.com?
File/directory not being deleted?
files;rm;postgresql
See comments, but essentially removing some lingering configuration files which still pointed at /opt/pgAgent solved this.  Suggest it is marked as answered.  (OP did a manual cleanup of remaining configuration files and this enabled the install to work correctly)