Not sure if there's a command for that, but when you are installing applications from a foreign package/source on your distribution, it's totally up to you to keep things organized. Say, compile your programs always to /usr/local/program (with the "--prefix" parameter when running "./configure"). That way is easier to keep track of what you are doing.
Depending of your distribution/OS and packages, the installation varies. All programs in Slackware installed from native format (.tgz) can be tracked down at /var/log/packages (if I remember right) while native FreeBSD packages are can be viewed at /var/log/db (or something of that sort.. I'm on WinXP right now and my memory is failing
So, short answer is: Try to stick with native packages for your distribution. If you've to compile something, compile it to a local where you can actually see them installed /usr/local/<program> is nice...