Register a domain and help support LQ
Go Back > Blogs > craigevil's random words of wisdom
User Name


Ramblings about Debian GNU/Linux
Rate this Entry

Howto get newer package versions for Debian Stable

Posted 03-28-2012 at 09:43 AM by craigevil
Updated 06-15-2012 at 05:57 PM by craigevil

DebianSoftware -
New Debian users should obtain all their software from the Debian repositories. The Debian maintainers have gone to a lot of work to ensure that the software in the Debian repositories works well together and is secure. Getting software from non-Debian sources voids the (non-existent) warranty! The combination of package management systems and the advent Linux distributions which supply vast amounts of software fundamentally changes appropriate system administration practice, especially for the typical user. Do not obtain software from anywhere other than Debian, not even from the software's author, unless you have the skills and the time to solve the resultant problems! Linux newbies are often used to obtaining their software directly from the software's author, as well as from other random places on the Net. This practice contributes to the instability, inflexibility, and insecurity of non-Linux systems. You may think that because you are used to obtaining software from various sources and integrating it into your system that this practice is manageable. Experience suggests otherwise. You are advised to wait until you have navigated several major system upgrades and consider yourself something of a Linux expert before venturing away from the supported Debian software repositories.
So you want/need a newer version of a package than what is currently in Stable, what do you do. First look in the backports repo located at

Once you find what you are looking for you need the backports repo in your sources.list.

Add the backports repo to your sources.list
sudo nano /etc/apt/sources.list
that will open your sources.list in nano so you can add:
# Debian Stable Backports
deb squeeze-backports main contrib non-free
ctrl+shift+v will paste
ctrl+o writes to the file
ctrl+x saves

Next as root do:
apt-get update
Search for a package for example vlc
apt-cache search vlc

Newer Software For Debian Stable
Because Debian's stable release changes minimally after release, and has few changes in months prior to release, the software included is not always the latest and greatest. Those who need newer software but still want the reliability and security of Debian stable can often satisfy their wants with software from backports,

Backports provide not only newer applications but also newer kernels. Installing a newer kernel is often the best way to solve problematic hardware issues because the newer kernel contains many newer drivers and bug fixes.

If you need something that is not in backports, or something even newer that what's in backports, a good option is to backport the newer package yourself from the Debian sid/unstable release. If the instructions for backporting from sid/unstable are not clear or you need further help the IRC channel can be a good support option. You may also ask there should you need software even newer than that available in sid/unstable.

Backporting (recompiling and repackaging) is the only safe way to install packages from Debian Sid or Debian Testing on a Debian stable system. Do not install such packages without backporting. Attempting to "mix" releases, especially by updating your sources.list file, is a sure way to break your system. Recovery in these cases usually involves restore from backup.

Note that installing the latest software may not be the best way to meet your real needs. IRC, and other support options, may be able to suggest other alternatives that help you accomplish your real goal.
Unfortunately not all packages are in backports, for example vlc is not in backports.
In this case you basically have 4 options:
1) Build it from sid yourself
How do I backport a sid package to testing or stable?

Install the Debian source (and the development tools, especially debhelper, devscripts, and build-essential), and then build the package.

Step by step:
Following the same steps you used to add the backports repo:
add a deb-src line for sid to your sources.list
deb-src unstable main contrib non-free

apt-get update

apt-get build-dep PACKAGE_NAME

apt-get -b source PACKAGE_NAME

The resulting debs should be in the current directory and can be installed with dpkg -i the.deb or gdebi if you have it installed.
2) Download the source from the vlc site(or whatever package you need) and try to compile it. Usually there is a follow the steps in it to install, you can use checkinstall instead of using make install, this will create a .deb which can be easily removed using apt-get/aptitude. Or follow the steps located at HowTo Build a Package from Source the Smart Way - to correctly build a proper Debian .deb.
3) Use the Mepis or Solusos repos , which are based on Debian Stable, they usually have newer versions of many packages. This method is not recommended or supported.
4) If it is a multimedia package you can check if it is in the repo.

Always look in backports first.

In the case of Iceweasel/Firefox there is a separate repo located at follow the directions there to install whichever version of Iceweasel you are wanting to use, it currently has the current release, Beta, and Aurora.

There are many third party repos available, many of which are in my Giant sources.list. However you are advised to stick with the Debian repos as much as possible. Do not mix Stable, Testing, or Unstable repos or packages. Stick with the release you are running, your system will be much more 'stable'. You have been warned, now go forth and apt-get moo.

Some additional notes:
1) Before upgrading please read the changelog from Sid first (packages in Backports are, at most, as new as those in Sid) and make sure that you have a valid reason to update a package. Keep in mind newer isn't always better.

2. Since Backports became official, there's no need to install its keyring package; it's now included in the Debian keyring.

3. The Debian Mozilla repository is effectively a Backports one. It may not be official, but it behaves like Backports, identifies as Backports does and needs Backports to fulfill its dependency chain when using it on Stable.
For the release version of Iceweasel use:
deb squeeze-backports main
deb squeeze-backports iceweasel-release
4. The Debian Multimedia repo has recently changed domains which also means changing your sources.list.
# Debian Multimedia Packages -
# deb squeeze main non-free
# deb squeeze-backports main
Also see:
Apt-Pinning for Beginners -
Note it is safest to always use /etc/apt/apt.conf
APT::Default-Release "stable";

AptPreferences - Debian Wiki :
Howto: Set up and Maintain a Mixed Testing/Unstable System :
Basics of the Debian package management system -
Debian package management :
Newbiedoc :
aptitude user's manual -
Apt - Debian Wiki -
Secure APT -
DebianSoftware - Debian Wiki :
Posted in Uncategorized
Views 21584 Comments 3
« Prev     Main     Next »
Total Comments 3


  1. Old Comment
    To install sid packages in testing do:
    echo 'APT::Default-Release "testing";' >> /etc/apt/apt.conf, edit sources.list, copy your non-security testing lines and change one set to sid, then apt-get update.  Use apt-get -t sid install foo; to install foo from sid rather than testing as usual.  WARNING to SYNAPTIC users: Synaptic ignores Default-Release: set Preferences->Distribution
    You can also use the aptosid or siduction repos.

    Or backport from sid following the steps in the main post.

    To upgrade a package that was installed from source do:
    uupdate (in the <devscripts> package) upgrades a source code package from an upstream revision, or e.g. if the newest foo in debian is 1.2, and upstream is at 1.4: apt-get source foo; wget -nd; cd foo-1.2; uupdate ../foo-1.4.tar.gz
    Posted 05-25-2012 at 09:06 PM by craigevil craigevil is offline
  2. Old Comment
    For a complete example of the steps backporting your own package See
    Posted 05-31-2012 at 05:17 PM by craigevil craigevil is offline
  3. Old Comment
    Some info about versions in Stable, from a post over at

    You'll find the answer in: debian-faq/ch-choosing.en.html:
    Quote: might find that stable contains old versions of packages. However, they have been tested in and out. One can confidently say that the packages do not have any known severe bugs, security holes etc., in them. The packages in stable integrate seamlessly with other stable packages.
    Getting the latest packages to work in the current stable release requires backporting, and this takes some time, skill and effort by unpaid volunteers. Sometimes it's easy to backport a package but other times it's not so easy.
    On the other hand, packages in testing or unstable can have hidden bugs, security holes etc., Moreover, some packages in testing and unstable might not be working as intended. Usually people working on a single desktop prefer having the latest and most modern set of packages. Unstable is the solution for this group of people.

    As you can see, stability and novelty are two opposing ends of the spectrum. If stability is required: install stable distribution. If you want to work with the latest packages, then install unstable.
    So if you want quick access to the newest package, run sid:
    But please see life_with_eternal_upgrades:
    It takes no more than simply setting the distribution string in the "/etc/apt/sources.list" to the suite name: "testing" or "unstable"; or the codename: "wheezy" or "sid". This makes you live the life of eternal upgrades.

    The use of testing or unstable is a lot of fun but comes with some risks. Even though the unstable suite of Debian system looks very stable for most of the times, there have been some package problems on the testing and unstable suite of Debian system and a few of them were not so trivial to resolve. It may be quite painful for you. Sometimes, you may have a broken package or missing functionality for a few weeks.
    So one solution proposed by the author of The Debian Reference is:
    Make the system dual bootable by installing the stable suite of Debian system to another partition
    Posted 10-15-2012 at 03:16 PM by craigevil craigevil is offline


All times are GMT -5. The time now is 05:25 PM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration