Originally posted by davidas
I'm currently on "Sarge". How do I go about using apt-get install, apt-file search and apt-cache search on another favor(eg. Unstable), without affecting the integrity of my packages which are on "Sarge" distribution?
You would need to use apt pinning in your /etc/apt/apt.conf you need a Default Release line telling the package system which branch of the archives you want to track. Then you need an /etc/apt/preferences file to define the pin priority for the packages.
>$ cat /etc/apt/apt.conf
>$ cat /etc/apt/preferences
Pin: release testing
Pin: release unstable
Make sure that you have the Cache-Limit line in the apt.conf file before you apt-get update after adding unstable to the sources.list or your apt cache will give you a Dynamic mmap out of room error. Now when you install a package you will get it from testing by default and if you want to install a package from unstable you would use apt-get -t unstable install package_name
and it would install the package from unstable sometimes it complains about a version of a library that needs to be a higher version before it will install a package you would just add it on to the end of the install line to get the version needed from the unstable branch.