This is an old revision of the document!
apt-get
You can run a simulation to see what would happen if you upgrade/install a package:
apt-get --dry-run install <package> <pkgname>
(or -s)
apt-get install --donwload-only <pkgname>
(or -d)
apt-get update
so your package list is up-to-date,
apt-cache search
apt-cache show postgresql
the simplest way to see the description of a package:
apt-cache policy <package>
Otherwise it prints out detailed information about the
priority selection of the named package (as a consequence, installed and candidate versions)
The apt-cache command can do keyword-based package searches with apt-cache search keyword. It can also display the headers of the package's available versions with apt-cache show package. This command provides the package's description, its dependencies, the name of its maintainer, etc.
How to upgrade a single package using apt-get? You just need to do apt-get install –only-upgrade <packagename>. This will upgrade only that single package, and only if it is installed.