Tips and tricks
How do I check what version package $x gets upgraded to?
apt-cache policy <package>
How can I check by which package a file is owned?
dpkg -S <file>
How can I install packages from unstable in testing? Apt-Pinning
apt-pinning is the answer.
You have to edit or create those configuration files
In /etc/apt/sources/ add the other distributions you want to use. For example if you are in testing, add the same entries with unstable or higher.
# testing deb http://ftp.debian.org/debian/ testing main contrib deb-src http://ftp.debian.org/debian/ testing main contrib # unstable deb http://ftp.debian.org/debian/ unstable main contrib deb-src http://ftp.debian.org/debian/ unstable main contrib # experimental deb http://ftp.debian.org/debian/ experimental main contrib deb-src http://ftp.debian.org/debian/ experimental main contrib
In /etc/apt/apt.conf set a higher cache limit for apt-get so it doesn't run out of memory during updates
In /etc/apt/preferences add the higher trees with a lower Priority so they do not overwrite your basic packages from your main tree.
# testing Package: * Pin: release a=testing Pin-Priority: 650 # unstable Package: * Pin: release a=unstable Pin-Priority: 600 # experimental Package: * Pin: release b=experimental Pin-Priority: 550
In case you want to have a certain package from eg unstable overrule the testing package, add a new entry like this
Package: mutt Pin: release a=unstable Pin-Priority: 700
To install packages there are two ways. One is to try to install just the package, and the other way is to install all the packages and also the ones needed to satisfy its dependencies. The second choice is of course more dangerous because it can overwrite important libraries and make your system unstable.
to install just the package:
apt-get install <package>/<tree>
to install the package and all needed dependencies:
apt-get -t <tree> install <package>
<tree> stands for the release, eg testing, unstable, ...
Install missing keys for apt-get
you have to had gpg run at least one time before, or it will not work.
to get the gpg key
gpg --recv-keys <key>
and then import them into the apt-key system
gpg --export --armor | apt-key add -
you can also directly download and install the key
wget http://host.domain.com/keyname.asc -O - | apt-key add -