Upgrading Debian to Unstable

Published on May 7, 2013

Krzysztof Litwin

Upgrading Debian to Unstable


This article will guide you through the process of upgrading your fresh installation of Debian to Unstable (Sid) version.

Don't let the name fool you. While Debian Unstable might sometimes happen to introduce some bugs or regressions with it's updates, it surely isn't as 'Unstable' as name would suggest. Debian Unstable is made mostly of stable releases of software packages, not development versions as one might think at first.

Adding further to this, regular Ubuntu releases are based on Debian Unstable and their LTS (Long Term Support) releases are based on Debian Testing.

Biggest benefits of upgrading to Unstable are:

  • Fresh versions of OS base
  • Fresh versions of packages (software, libraries, etc.)
  • Latest bugfixes and security updates

Before you proceed:

Please be aware that the steps in this tutorial should only be performed on a clean installation of Debian. We are also going to show how to enable 'contrib' and 'non-free' repositories. You can read about them here. Additionally, if you wish to enable those repositories, please read "Step 2" carefully.

Step One

Before you get to the upgrading process, you should determine if it's safe for you to do so right now. Because Debian Unstable is often updated, it might happen that it's repository is currently being under maintenance and some packages may fail to install. To help you determine whether it is safe or not to perform the upgrade, you can check out Debian Weather to see if you can proceed further.

When you confirm that you are safe to proceed, you can start by logging into your server as root.

Step Two

Open the configuration file in editor:

nano /etc/apt/sources.list

The file should look similar to this:

deb http://ftp.us.debian.org/debian squeeze main
deb http://security.debian.org/ squeeze/updates main

For the first line, change "squeeze main" at the end of the line with "sid main".

deb http://ftp.us.debian.org/debian sid main

Then, replace the entire second line with the following command:

deb http://ftp.us.debian.org/debian squeeze main

Now, if you want to enable 'contrib' and 'non-free' repositories, add a third line and insert 'contrib non-free'.

deb http://ftp.us.debian.org/debian sid main contrib non-free

To save your changes, press:


Then confirm with:


Finally, close the editor by pressing:


Step Three

Update your package lists by typing:

apt-get update

Now, to upgrade, here are the following instructions:


apt-get dist-upgrade

Then confirm that you want to continue with the process and let it run. Don't hide the terminal as you will likely encounter a few questions during the upgrade. If this dialog window appears:

 ----------------------------| Configuring libc6 |----------------------------
 |                                                                           | 
 | There are services installed on your system which need to be restarted    | 
 | when certain libraries, such as libpam, libc, and libssl, are upgraded.   | 
 | Since these restarts may cause interruptions of service for the system,   | 
 | you will normally be prompted on each upgrade for the list of services    | 
 | you wish to restart.  You can choose this option to avoid being           | 
 | prompted; instead, all necessary restarts will be done for you            | 
 | automatically so you can avoid being asked questions on each library      | 
 | upgrade.                                                                  | 
 |                                                                           | 
 | Restart services during package upgrades without asking?                  | 
 |                                                                           | 
 |                    <Yes>                       <No>                       | 
 |                                                                           | 

Select <Yes>.

For the rest of dialogs and questions, if you don't know what to select, just keep the default selections and continue.

Sometimes during an upgrade process, an error will pop-up, usually about that there is an unmet dependency or process is locked. If you encounter this, try to restart the upgrading process by issuing:

apt-get dist-upgrade

If you are still having issues with the upgrade process, enter:

apt-get -f install

Then run the update command again.

apt-get dist-upgrade

If you encounter any more errors, try to use methods provided above again to see if it will solve them. If problems continue to persist and mentioned methods fail, it might be easier to rebuild your server and restart the procedure - that's why the process should be performed on a clean install.

Once the process have been successfully completed, reboot your server.


Give it some time to reboot and reconnect. If everything goes well, you are now running Debian Unstable!

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors
Default avatar
Krzysztof Litwin


Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

In the droplet config I’m not able to change to a kernel more recent than 3.2

ok, now I 100% got it right, the three packages I have are:

deb http://ftp.us.debian.org/debian unstable main contrib non-free

deb http://ftp.us.debian.org/debian wheezy main

deb http://ftp.us.debian.org/debian sid main contrib non-free

in my case I use Debian Wheezy


by the way, I get some error message " duplicate …blah blah…

I guess this package here has a typo: deb http://ftp.us.debian.org/debian sid main contrib non-free

and should be replaced with this: deb http://ftp.us.debian.org/debian sid contrib non-free

correct me if I’m wrong!!

Thanks for the great tut. This is what I was looking for. it works just fine.

You got something wrong there i think. From the debian unstable wiki:


Does sid have security updates?

Not in the same sense that stable does. If the maintainer of a package fixes a security bug and uploads the package, it’ll go into sid by the normal means. If the maintainer doesn’t do that, then it won’t. The security team only covers stable (and possibly testing… there’s a pending issue for that case).

Sid users are strongly urged to subscribe to the Debian security announce mailing list. And while you’re at it, you should also be on the Debian devel announce list and Debian devel list.

Thanks. Useful.

Couple of points:

When adding ‘contrib’ and ‘non-free’, you repeat ‘main’, which causes apt-get warning.

Either add third line without ‘main’: deb http://ftp.us.debian.org/debian sid contrib non-free

or replace the first line with all three: deb http://ftp.us.debian.org/debian sid main contrib non-free

Also, if you want to update to the latest linux kernel after dist-upgrade, you need to update grub or follow these DigitalOcean-specific steps:

  1. From the DigitalOcean Control Panel, select the droplet and click ‘Settings’. Using the Kernel drop-down list, find and select the latest Debian Unstable image, and click ‘Change’.
  2. Shut down the droplet from API
  3. Boot the droplet from the Control Panel.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel