You are here: Home / Debian GNU/Linux / System / Software / Setup the Debian Backports apt repository

Setup the Debian Backports apt repository

by Pierre-Yves Landuré last modified Oct 01, 2013 11:06

The Debian Backports repositories provide recent versions of fast release software. Maintained by the Debian community, they allow to install recent software without newer dependencies.

This howto is tested on :

  • Debian 6.0 Squeeze
  • Debian 7.0 Wheezy


Install the Linux Standard Base software :

command apt-get install lsb-release

Detect the distribution name :

DEBIAN_VERSION=$(command lsb_release -cs)

Detect the repository base URL :

if ! command wget --quiet --spider "${BASE_URL}/dists/${DEBIAN_VERSION}-backports"; then

Add the software repository to the apt configuration :

command echo "# Debian Backports
deb ${BASE_URL} ${DEBIAN_VERSION}-backports main" \ > '/etc/apt/sources.list.d/debian-backports.list'

Update the list of available packages :

command apt-get update


You can now install software from Backports repository by using the -t option :

# command apt-get -t "squeeze-backports" install "package"