Debian Jessie is installing too many backports

  1. Try adding the following to either /etc/apt/apt.conf or a file under /etc/apt/apt.conf.d:

    APT::Default-Release "jessie";

  2. To remove the existing backports, you'll need to get a list of which ones were installed, and what version they replaced. Fortunately, this information can be extracted very easily from /var/log/dpkg.log

e.g. grep ' upgrade ' /var/log/dpkg.log will give you many lines like the following:

2016-02-15 11:06:32 upgrade python-numpy:amd64 1:1.11.0~b2-1 1:1.11.0~b3-1

This says that at 11:06am on 15th Feb, I upgraded python-numpy from version 1:1.11.0~b2-1 to version 1:1.11.0~b3-1

If I wanted to downgrade to the previous version, then I would run:

apt-get install python-numpy=1:1.11.0~b2-1

NOTE: in this particular case, it probably won't work because I run debian sid aka unstable so the old version is probably no longer available in the deb repository. If you're running jessie and are re-installing a jessie version of a package as a downgrade to the jessie-backports version, it will work as expected.

Similarly, if a package has been removed you can find it and its exact version by grepping for remove in /var/log/dpkg.log.


Bulk downgrading of many packages can be largely automated using standard tools like awk and grep. For example, If you know that the jessie-backports upgrades you installed were all done on a particular day (e.g. 2016-02-15), then you can downgrade to the previous versions with something like:

 apt-get -d -u install $(awk '/2016-02-15 ..:..:.. upgrade / {print $4 "=" $5}'
    /var/log/dpkg.log)

(line-feed and indentation added to avoid horizontal scroll-bar)

NOTE the use of the -d (--download-only) option. Re-run the command and remove that option after you've verified that the apt-get install will do what you want, and ONLY what you want.

I would also recommend running only the awk portion of that command by itself first so you can see a list of exactly which packages and versions will be re-installed.