Ok, I am about to go to sleep. I have to be up for an onsite meeting with a customer first thing in the morning so it may be a little while before I can respond.
Once you have this information and it looks reasonably complete (you could have several packages installed) then you can start by backing up files in preparation for rebuilding your system. I would recommend backing up everything in /var/lib/postgresql, /etc/postgresql/, and /etc/apache2
Back them up to somewhere external to your computer (it could be cdrom, or another computer, or uploaded to Google Drive or Dropbox). If your data is important you don't want to accidently overwrite something during the rebuild process.
Once this is done and you have verified that the files are there, and that you can access them, then the next thing to do would be to start on the rebuild (please see cautions below).
If I were in your position I would wait and have folks check the output of the package listings for what software may be installed and where. I can offer paid support (hands-on, logging into your system), but it would be best-effort (at present I don't see a reason to think that information has been lost but that could change especially if you proceed with the rebuild without verified backups). I am sure there are others who can offer good quality commercial support as well. I would probably be unable to start though until tonight your time, and rather late (ssh access is all I would need to get started and verify things).
I will try to check and respond before heading out to my meeting in the morning.