How do I find the most recent version of a package in the repositories in a shell script? If I use
apt-cache-policy, I get the installed version as "Candidate", not the most recent one from the repositories.
apt-cache policy nvidia-current shows:
nvidia-current: Installed: 280.13-0ppa~natty1 Candidate: 280.13-0ppa~natty1 Version table: *** 280.13-0ppa~natty1 0 100 /var/lib/dpkg/status 270.41.06-0ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ natty/restricted amd64 Packages
It looks like the installed version is marked with
***, so that one must be ignored. Perhaps there is an awk script that could be used?