Downgrade debian: from testing to stable
As you know, Debian stable is always stable, like a brick. Testing, however, becomes such only in the second half of the stay in testing. What should I do if testing was everywhere written in your favorite Debian Lenny in sources.list, and when Lenny became stable on February 14, your system upgraded to Squeeze, bringing a bunch of small and unpleasant bugs? Downgrade is not officially supported - but this does not mean that it is not possible. I could not find instructions for downgrade with Squeeze (all instructions are quite old), so I decided to write this one.
So, for starters, we need to get into /etc/apt/sources.list and replace testing and squeeze with stable, bringing everything to something like this:
So, for starters, we need to deal with apt-pinning. Create a file / etc / apt / preferences with similar content:
Thus, priority will be given to packages from a stable repository.
Now update the package information:
And we make the first attempt to downgrade:
If everything goes well, then we will be shown that it is necessary to downgrade about a thousand packages, remove a few dozen (and among them there may be not only some unimportant things, but also quite used software, in my case - gedit and deluge. Nothing, put later). We agree, a certain number of packages are downgrade, we come across the first error:
We treat it, in general, with the poke method. With some helps:
Some can be cured through Synaptic: either Edit> Broken Packages, or use the Broken Packages filter and try to remove / reinstall one at a time.
Often, installing with --force-overwrite fails due to unsatisfied dependencies:
Well, put the dependencies:
... and again we put the package itself:
There are packages for which we cannot satisfy dependencies - they appeared only in Squeeze. So, we simply do not need them:
If something depends on them - great, first remove the dependent package, then return to this.
Having made it through the first (largest) portion of errors, we renew our
and repeat the procedure.
As a result, we have a completely normal Debian Lenny. Although, of course, problems are possible. In my case, problems arose with the /usr/lib/libgssapi_krb5.so.2 library. Without it, it was impossible to log in (except in safe mode), and some programs did not work. I had to take this library from Squeeze and put it in Lenny - everything worked perfectly.
So, for starters, we need to get into /etc/apt/sources.list and replace testing and squeeze with stable, bringing everything to something like this:
deb mirror.yandex.ru/debian stable main contrib non-free
deb security.debian.org stable/updates main contrib non-freeSo, for starters, we need to deal with apt-pinning. Create a file / etc / apt / preferences with similar content:
Package: *
Pin: release a=stable
Pin-Priority: 1001
Package: *
Pin: release a=testing
Pin-Priority: 60
Package: *
Pin: release a=unstable
Pin-Priority: 50Thus, priority will be given to packages from a stable repository.
Now update the package information:
$ sudo apt-get updateAnd we make the first attempt to downgrade:
$ sudo apt-get dist-upgradeIf everything goes well, then we will be shown that it is necessary to downgrade about a thousand packages, remove a few dozen (and among them there may be not only some unimportant things, but also quite used software, in my case - gedit and deluge. Nothing, put later). We agree, a certain number of packages are downgrade, we come across the first error:
dpkg: error processing /var/cache/apt/archives/gstreamer0.10-plugins-good_0.10.8-4.1~lenny1_i386.deb (--unpack):
trying to overwrite `/usr/lib/gstreamer-0.10/libgstcdio.so', which is also in package gstreamer0.10-plugins-ugly
dpkg-deb: subprocess paste killed by signal (Broken pipe)We treat it, in general, with the poke method. With some helps:
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/gstreamer0.10-plugins-good_0.10.8-4.1~lenny1_i386.debSome can be cured through Synaptic: either Edit> Broken Packages, or use the Broken Packages filter and try to remove / reinstall one at a time.
Often, installing with --force-overwrite fails due to unsatisfied dependencies:
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/gconf2-common_2.22.0-1_all.debdpkg - warning: downgrading gconf2-common from 2.26.0-1 to 2.22.0-1.
(Reading database ... 248673 files and directories currently installed.)
Preparing to replace gconf2-common 2.26.0-1 (using .../gconf2-common_2.22.0-1_all.deb) ...
Unpacking replacement gconf2-common ...
dpkg: dependency problems prevent configuration of gconf2-common:
gconf2-common depends on ucf; however:
Package ucf is not configured yet.
dpkg: error processing gconf2-common (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
gconf2-common
Well, put the dependencies:
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/ucf_3.0016_all.deb(Reading database ... 248668 files and directories currently installed.)
Preparing to replace ucf 3.0016 (using .../archives/ucf_3.0016_all.deb) ...
Unpacking replacement ucf ...
Setting up ucf (3.0016) ...
Processing triggers for man-db ...
... and again we put the package itself:
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/gconf2-common_2.22.0-1_all.deb(Reading database ... 248668 files and directories currently installed.)
Preparing to replace gconf2-common 2.22.0-1 (using .../gconf2-common_2.22.0-1_all.deb) ...
Unpacking replacement gconf2-common ...
Setting up gconf2-common (2.22.0-1) ...
Replacing config file /etc/gconf/2/path with new version
There are packages for which we cannot satisfy dependencies - they appeared only in Squeeze. So, we simply do not need them:
sudo dpkg --remove libnm-util1If something depends on them - great, first remove the dependent package, then return to this.
Having made it through the first (largest) portion of errors, we renew our
$ sudo apt-get dist-upgradeand repeat the procedure.
As a result, we have a completely normal Debian Lenny. Although, of course, problems are possible. In my case, problems arose with the /usr/lib/libgssapi_krb5.so.2 library. Without it, it was impossible to log in (except in safe mode), and some programs did not work. I had to take this library from Squeeze and put it in Lenny - everything worked perfectly.