The rmadison
program from the devscripts
package will remotely query the Ubuntu archive and give you the status of a package in all supported releases, not only those you have locally insatlled. This is slightly more than what you want, but should get the job done easily.
Example:
lfaraone@stone:~$ rmadison sudo
sudo | 1.6.8p12-1ubuntu6 | dapper | source, amd64, i386, powerpc
sudo | 1.6.8p12-1ubuntu6.3 | dapper-security | source, amd64, i386, powerpc
sudo | 1.6.8p12-1ubuntu6.3 | dapper-updates | source, amd64, i386, powerpc
sudo | 1.6.9p10-1ubuntu3 | hardy | source, amd64, i386
sudo | 1.6.9p10-1ubuntu3.8 | hardy-security | source, amd64, i386
sudo | 1.6.9p10-1ubuntu3.8 | hardy-updates | source, amd64, i386
sudo | 1.6.9p17-1ubuntu3 | jaunty | source, amd64, i386
sudo | 1.6.9p17-1ubuntu3.3 | jaunty-security | source, amd64, i386
sudo | 1.6.9p17-1ubuntu3.3 | jaunty-updates | source, amd64, i386
sudo | 1.7.0-1ubuntu2 | karmic | source, amd64, i386
sudo | 1.7.0-1ubuntu2.4 | karmic-security | source, amd64, i386
sudo | 1.7.0-1ubuntu2.4 | karmic-updates | source, amd64, i386
sudo | 1.7.2p1-1ubuntu5 | lucid | source, amd64, i386
sudo | 1.7.2p1-1ubuntu5.1 | lucid-security | source, amd64, i386
sudo | 1.7.2p1-1ubuntu5.1 | lucid-updates | source, amd64, i386
sudo | 1.7.2p7-1ubuntu1 | maverick | source, amd64, i386
before you can use rmadison
you must install the devscripts
package:
sudo apt-get install devscripts