Please see the screenshot. The image on the left says existing x installation found at /opt/x The 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?


  • 1
    Use the command line, and give the commands and their output as code (add four spaces in front of each line) in your question. Your image is unreadable, so edit your question to improve it. Aug 10 '15 at 18:17
  • @BasileStarynkevitch done, hope it's better now
    – Yogesch
    Aug 10 '15 at 18:23
  • Probably a postgresql.conf file still in /etc/postgresql that points at /opt/pgAgent
    – steve
    Aug 10 '15 at 18:28
  • I had done a dpkg --purge $(dpkg -l | grep rc | grep pg) and dpkg --purge $(dpkg -l | grep rc | grep post). Could any .conf files still remain after that?
    – Yogesch
    Aug 10 '15 at 18:37
  • 1
    @steve Yes, indeed. It seems to work now after doing a thorough cleanup of all possible postgres files in all the /etc, /bin, /usr, /usr, /var, /tmp, /opt directories. thanks :) seems like the purge options (in dpkg, as well as apt-get of course) don't really purge everything and leave lingering bits behind. I didn't retry after cleaning through each location, so can't pinpoint it precisely, but it was a leftover...
    – Yogesch
    Aug 10 '15 at 20:10

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)


If you use, for example, a mountable USB device, the connection may have loosened after the mount. The directories will appear clobbered (as you described). You may unmount and then remount the device once it is plugged in properly. An alternative may be just to plug in correctly before even unmounting and checking whether the directories became available. I'm not sure which may be the safer way to avoid data loss. I went only through the first approach.

  • discovered on another screen the message : unable to stop the drive, timeout was reached (RHEL)
    – Wolfram J
    Jan 2 '19 at 1:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.