/etc/apt/sources.list
lists package sources, i.e. sites from which packages are downloaded. It does not list individual packages.
Ubuntu themselves distribute a lot of software. As long as it's open source, isn't horribly buggy, and is actively maintained, it's eligible for being in Ubuntu (at least in the “universe” repository, which redistributes most Debian packages). (These are not necessary conditions, but they're the most common case.) It may or may not actually be in Ubuntu: another criteria is that there must be a volunteer to work on that package (unless it's part of the small core that Canonical will pay someone to work on). Packages like okular and git are part of Ubuntu (universe and main respectively). So the corresponding line in sources.list
is one of the ones with archive.ubuntu.com
.
You can get information about Ubuntu packages online on http://packages.ubuntu.com/, or on your machine using the APT software suite. Run apt-cache show PACKAGE
to get information about PACKAGE
(whether it's installed or not). Run apt-cache policy PACKAGE
to see a summary of installed and available versions of the package. Run apt-cache search FOO
to search for packages whose description contains FOO
.
Running apt-get update
updates the local copy of the list of available packages that apt-cache
queries. Ubuntu sets up a daily job to do that, so if your machine has an Internet connection, your machine will have an almost-up-to-date version (but it's still a good idea to run it manually just before installing or updating packages). apt-get update
does not make any modification to the software installed on your machine. Running apt-get upgrade
(or one of the XXX-upgrade
variants) upgrades installed packages to the latest eligible version according to the local copy of the package lists.
The version shipped by Ubuntu may not be the latest version available from the original developer. Ubuntu compiles all programs from source (except for a few non-open-source ones), tests them if they're in main (not if they're in universe), and makes a release every 6 months, so you generally end up with software that's 3–9 months old. That's generally not a problem as it's quite rare to need the latest, untried version of a program. Critical bugs such as security issues do get quick updates outside of the release cycle (they're backported, i.e. the fix is applied to the version that was released, rather than shipping the latest version immediately). If you absolutely wanted the latest version, you could look for a PPA (a source of extra packages that is not maintained by Ubuntu, quality varies), or try the latest version from Debian unstable, or recompile the upstream source — but once again most people don't need that.