I would like to know what causes Ubuntu and/or Synaptic to recognize a program as being installed. Is there an equivalent of the Windows registry that an application has to have a entry in? Does a program have to be installed from a .*deb package to be classified as installed and show up in Synaptic? And where are files for an installed program usually kept? I know that configuration files are kept in /home/x/ but not much else.
dpkg, through apt or aptitude keeps a database of the installed software in
My response is based on a response given in this forum discussion.
As @psusi pointed out, because apt and aptitude are merely front-ends to dpkg, it is actually dpkg that keeps track of packaging.