How to add debian "testing" repository to apt-get [duplicate]

Solution 1:

"testing" repo makes new updated packages available to the user (ie apt-get or synaptic) which would otherwise come in the next Debian release.

Caution: testing packages may not be the most stable packages, but it is more stable than the "unstable" repo.

  1. Login as root Open file /etc/apt/sources.list in your favourite editor

    vi /etc/apt/sources.list

  2. Adding the testing repo. Add the below line.

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

  3. Then run sudo apt-get update

MISC NOTES:

Note the format of the repo line added.

deb <link from where packages will be downloaded from> <repoName> <sub branches of the repo>

Examples:

deb http://http.us.debian.org/debian/ testing non-free contrib main
deb http://http.us.debian.org/debian/ stable non-free contrib main
deb http://http.us.debian.org/debian/ unstable non-free contrib main
deb http://http.us.debian.org/debian/ wheezy non-free contrib main

Note in the above line "wheezy" repo is debian 7.0 release default repo. Unstable repo can have error prone packages.