<br /> How I Downgraded Testing to Stable – Debian Planet

Welcome to Debian Planet

News for Debian. Stuff that *really* matters

Sponsorship

Debian Planet is hosted by Bluelinux Internet Services Ltd. Offering a special discounted rate for Free and Open Source software community members.

Buy your Debian merchandise at DebianShop.com.

Debian
These are important Debian sites one should not be without!

  • Official Debian site
  • Package search
  • Mailing list archives
  • Bug reports
  • Debian on CD
  • Debian Weekly News — excellent news source!
  • Unofficial APT sources
    (apt-get.org)

  • Developers’ Corner
  • Community
    Need help? You’re not alone on this planet.

  • Planet Debian
  • debianHELP
    (User support site)

  • Debian Administration
    (SysAdmin resources)

  • Debian International
  • DebianForum.de
    (Deutsch)

  • DebianForum.dk
    (Dansk)

  • EsDebian
    (Español)

  • DebianWorld
    (Français)

  • Debian-Fr
    (Français)

  • MaximumDebian
    (Italiano)

  • DebianItalia
    (Italiano)
  • DebianUsers
    (한국어)

  • Debian-BR
    (Português)

  • DebianHOWTO
    (Deutsch)

  • Russian Debian (Русский)
  • Debian-JP
    (日本語)
  • Debian Suisse
    (Suisse)
  • Contribute
    Got that latest or greatest scoop? Perhaps you have some important news for the Debian community? Submit a news item!

    Or perhaps you’ve written a rather ground breaking insight into some aspect of Debian and you feel compelled to share it with others? Knock up a longer editorial article and send it to the editors.

    General feedback should be sent to staff@debianplanet.org

    IRC
    The place to get help on a Debian problem (after reading docs) or to just chat and chill is #debian on irc.oftc.net.

    Many of the Debian Planet staff live there so pop by and say hello.

    Debian Planet also has its own channel on the same network called #debianplanet.

    Syndicate
    XML

    How I Downgraded Testing to Stable
    Submitted by hjhornbeck on Monday, December 09, 2002 – 05:56
    PackagesTable of Contents
    1. Introduction
    2. Baby Steps
    3. Lists, Lists, Lists
    4. Fetch!
    5. The Dirty Deed
    6. Conclusion

    1. Introduction

    Things don’t always go as planned. The computer that was supposed to be my second workstation has slowly become another server. Even worse, it is now serving data to the Internet, so security is now very important.

    It was running Debian Testing, which can be updated several times a day. These constant upgrades make it impossible to run a file integrity tool. The Stable branch suffers less from version thrashing, and is recent enough for my needs.

    Unfortunately, that computer has seen a lot of tweaking. I have a sizable collection of bash scripts that help keep it running, and keep me up-to-date. I’ve been doing a lot of PHP work, and my source files are scattered across the file system. Even if I’m careful, a full reinstall would require a ton of work to get it usable again.

    Downgrading my system would be a much better option. Unfortunately, some research turned up only a few warnings against it. Some complained that it was likely to break due to changed packages; a valid worry, but my copy of Testing was only a month ahead of Stable. Some complained about downloading a lot of packages, or manually working out dependencies. I have a lot of experience with small scripts, so automating those steps should be possible.

    My uptime was also pretty high at that point. Anything that could preserve that number was worth trying.
    _________________________________________________________

    2. Baby Steps

    Naively, I thought the best way to move from Testing to Stable was by editing sources.list. That didn’t downgrade any installed packages, however, and prevented security upgrades from working properly. I studied the man page for apt-get, but saw no way to downgrade packages with it.

    If apt-get wouldn’t help me, dpkg should. An experiment proved it would downgrade a single package. Unfortunately, I had over 300 packages installed, and dpkg didn’t provide a way to automatically download a package, let alone handle the dependencies. I developed a plan to deal with this:

    1. Get a list of all stable packages, including their version numbers.
    2. Create a similar list of the packages installed on my computer.
    3. Filter out a list of the packages that need changing.
    4. Download the changes.
    5. Reinstall all those packages.

    The dependency problems are handled by keeping the same packages installed, and by downgrading all of them. By only downloading what changed, I save time and bandwidth. Best of all, each step looks scriptable. I set about doing just that.
    _________________________________________________________

    3. Lists, Lists, Lists

    The list format would be pretty simple. Each line would contain a package name and version, separated by a space. It was easy to filter by version number, and mirrored the name_version_arch” pattern used for .deb package names.

    The first step was to get a list of all the packages in Stable. The first place I thought to look was Debian’s website, and sure enough I found a web page containing exactly what I wanted. A quick glance at the HTML source confirmed the ease of turning that page into the proper format. I downloaded the list and only kept lines referring
    to packages:

    Figure 1. Retrieving and filtering the package list

    wget -O – -q http://packages.debian.org/stable/allpackages.html | sed – ne ‘/-lt-dt-gt-/p/index.html’ > packages.temp

    That did nothing to filter out HTML code, though. Some experimentation with sed led to this complicated mess, which saved the results in packages_all:

    Figure 2. Cleaning up the package list sed -e ‘s/<dt>]*”>(.*) ([^ ]*).*/1 2/’ packages.temp > packages_all

    Now I needed a list of every package installed, in the same format. dpkg clips package names, so it can’t help. I tracked down a dpkg cache under /var/lib/dpkg/info, and noticed each installed package had at least one file named after it. Even better, all of them had files ending with .list. That was enough info to start the second list:

    Figure 3. Saving the name of every installed package
    ls /var/lib/dpkg/info/*.list | sed -e ‘s/.*/(.*).list/1/’ > packages.temp

    Now I just needed to extract version numbers for each package. dpkg can provide that, with a little filtering. The results are redirected to packages_local:

    Figure 4. Adding version numbers for each local package
    for FILE in `cat packages.temp` ; do
    VER=`dpkg -s $FILE | egrep “^Version: ” | sed ‘s/Version: //’`;

    echo $FILE $VER >> packages_local ;

    done

    That completes the first two steps. Now I had to figure out which packages had changed versions, thus needing a downgrade. I thought diff could handle this, but the man page convinced me otherwise. Instead, I used a more obscure command, comm. First, I filtered out the packages that both lists had in common, the ones that didn’t need downgrading:

    Figure 5. Finding only unchanged packages
    comm -12 packages_all packages_local > packages.temp

    Then I filtered those packages out of packages_local, leaving only the updated packages, and piped the results to packages_downgrade:

    Figure 6. Finding the updated packages
    comm -13 packages.temp packages_local >
    packages_downgrade

    That concludes step three. Pretty easy so far.
    _________________________________________________________

    4. Fetch!

    Step four involved downloading the changed packages. When I reviewed the list, I noticed a minor problem; there were over 120 packages that needed retrieving. That was too many to download by hand. More scripting was in order.

    Unfortunately, the path to any given Debian package in the on-line archives is not predictable. I tried parsing the local cache of package information for each package’s path, but got inconsistent results. Retrieving the necessary data from Debian’s website was too complex. My solution was to download and parse the Stable package lists from a mirror. I split the task into two shell scripts. The first downloads a series of package lists and condenses them into packages_list:

    Figure 7. Downloading the package lists
    #!/bin/sh

    # getpackagelists.sh: retrieves a series of package lists to create a
    # single one.

    MIRROR=”http://ftp.uk.debian.org/linux/debian/”
    # Uncomment the next if you are outside the US and want non-US
    #MIRROR_NONUS=”http://ftp.uk.debian.org/linux/debian-non-US/”
    BRANCH=”stable”
    ARCH=”i386″

    wget –passive-ftp -c -q -O –
    “$MIRROR/dists/$BRANCH/main/binary-$ARCH/Packages.gz”
    “$MIRROR/dists/$BRANCH/contrib/binary-$ARCH/Packages.gz”
    “$MIRROR/dists/$BRANCH/non-free/binary-$ARCH/Packages.gz”
    | gunzip > packages_list

    if [ -n $MIRROR_NONUS ] ; then
    wget –passive-ftp -c -q -O –
    “$MIRROR_NONUS/dists/$BRANCH/non-US/main/binary-$ARCH/Packages.gz”
    “$MIRROR_NONUS/dists/$BRANCH/non-US/contrib/binary-$ARCH/Packages.gz

    “$MIRROR_NONUS/dists/$BRANCH/non-US/non-free/binary-$ARCH/Packages.g
    z”
    | gunzip >> packages_list
    fi

    The second script downloads the needed packages, based on information from the condensed list:

    Figure 8. Downloading the packages
    #!/bin/sh

    # getpackages.sh: downloads the packages needed to downgrade.

    MIRROR=”/ftp-//ftp-uk-debian-org/pub/linux/debian/index.html”
    # Uncomment the next if you are outside the US and want non-US
    #MIRROR_NONUS=”/ftp-//ftp-uk-debian-org/pub/linux/debian-non-US/index.html”

    for FILE in `cut -d ” ” -f 1 packages_downgrade` ; do
    REMOTEPATH=`grep “/${FILE}_” packages_list | sed ‘/s/-Filename–/index.html’`

    if echo $REMOTEPATH | grep non-US > /dev/null &&
    [ -n $MIRROR_NONUS ] ; then
    wget –passive-ftp -c “${MIRROR_NONUS}/${REMOTEPATH}”
    else
    wget –passive-ftp -c “${MIRROR}/${REMOTEPATH}”
    fi

    done

    Some double checking proved that almost everything had been downloaded. The only exception was one package present in Testing but not in Stable. I saw no harm in leaving it installed.
    _________________________________________________________

    5. The Dirty Deed

    I wanted a safety net before I tried downgrading. In case one of the packages clobbered an important file, I backed up /etc, /home, /root and /var, plus a few other places.

    With nothing to stop me, I su’d to root and started downgrading packages via dpkg. I did them in alphabetical groups, so I could monitor the process better. In hindsight, this would have been more efficient:

    Figure 9. Downgrading all packages
    dpkg -i *.deb

    No configuration files were cleaned out. Apache needed no alteration, all my cron jobs were present, and my PHP scripts still worked. I could and still cannot find a single problem. I altered sources.list to include Debian’s security patches, and tested if they would install properly. They did.
    _________________________________________________________

    6. Conclusion

    The ease of downgrading took me by surprise. Programs can radically change over time, so my only assurance that a configuration file hadn’t moved or changed syntax was my proximity to a Stable release.Downgrading took about as long as a reinstall, although most of that time was spent developing the above scripts. Unlike a reinstall, it did nothing to clean up my directory tree. Nonetheless, I think I’ve shown downgrading is still an option. And it may be less painful than you’ve heard.

    Category: Tips

    Control panel

    Comment viewing options:



    Select your prefered way to display the comments and click ‘Update settings’ to activate your changes.

    Subject: APT pinning and how to fix gliches of the results
    Author: osamu
    Date: Tuesday, 2003/02/18 – 05:09
    One of the “Debian Reference” reader’s comment on the downgrading experience and my comments for that. Anyway, as few other posts already pointed out, APT pinning is the way to downgrade system.

    Downgrading from testing to stable

    By Auke Jilderda <auke@jilderda.net> Thu Dec 26 07:22:28 2002

    I couldn’t find much about downgrading a distribution so I decided to write
    down my experiences. I followed the reference manual chapter 6 and managed to
    downgrade some 380 packages, leaving some 8 packages from testing that I
    decided not worthwhile to downgrade.

    My recipe:

    1. Configure your apt-get

      Set up your /etc/apt/preferences as follows:

      Package: *
      Pin: release a=stable
      Pin-Priority: 1001

      Package: *
      Pin: release a=testing
      Pin-Priority: 60

      Package: *
      Pin: release a=unstable
      Pin-Priority: 50

      One catch though: I also had my /etc/apt/apt.conf set to:

      APT::Default-Release “stable”;

      which somehow prevented downgrading. Removing it for the time being fixed
      it but I don’t quite get why. I’d expect it to not matter with the
      preferences file set as above.

    2. Run “apt-get upgrade”

      It’ll fetch all packages it needs and start downgrading. It will fail
      on a number of occassions, each of which I fixed before re-running
      “apt-get upgrade” to continue. In hindsight, “apt-get dist-upgrade” seems
      more suitable for the job but I hadn’t thought of that.

      1. On my system, it failed to downgrade the dpkg itself so I forced it:

        dpkg –force-depends -r dselect
        dpkg -i /var/cache/apt/archives/dpkg_1.9.21_i386.deb

        It would probably have been better to pin the version from testing
        (similar to the package below) but ok.

      2. It failed to downgrade fileutils, shellutils, and textutils because of
        the package coreutils. Again, I forced dpkg to overwrite:

        dpkg -i –force-overwrite /var/cache/apt/archives/fileutils_4.1-10_i386.deb
        dpkg -i –force-overwrite /var/cache/apt/archives/shellutils_2.0.11-11_i386.deb
        dpkg -i –force-overwrite /var/cache/apt/archives/textutils_2.0-12_i386.deb

        After that, the rest went fairly smooth (though I had to restart “apt-get
        upgrade” a couple of times before it finished).

    3. Next, I checked which package was in which distribution:

      apt-show-versions | fgrep /stable
      apt-show-versions | fgrep /testing
      apt-show-versions | fgrep /unstable

      There turned out to be a couple of packages left. I removed the ones I
      don’t use anyway, downgraded a couple by hand, and decided to leave the
      remaining 8 untouched, partly because they’re too risky to screw up (e.g.
      libc6) and partly because it turned out I’m using functionality of the newer
      versions (e.g. e2fsprogs, gnupg):

      debian-reference-en/testing uptodate 1.05-2
      debian-reference-common/testing uptodate 1.05-2
      e2fsprogs/testing uptodate 1.29+1.30-WIP-0930-1
      gnupg/testing uptodate 1.2.0-1
      libc6-dev/testing uptodate 2.2.5-14.3
      libc6/testing uptodate 2.2.5-14.3
      locales/testing uptodate 2.2.5-14.3
      libdb1-compat/testing uptodate 2.1.3-7

    4. I pinned the two packages of which I keep the testing version by adding
      the following to /etc/apt/preferences:

      Package: e2fsprogs
      Pin: version 1.29*
      Pin-Priority: 1002

      Package: gnupg
      Pin: version 1.2.0*
      Pin-Priority: 1002

      Am not entirely sure whether this is ok but it works for now. My reason for
      pinning verions rather than distributions is that I’d like it to
      automagically move onto stable in time: when the version arrives in stable,
      I’d like to keep that instead of upgrade to the next testing version.
      However, it seems pinning versions can get out of sync so I’ll have to dig
      into those pin priorities some time soon.

    Summarising, downgrading is complex and cumbersome but it can be done and
    doesn’t break my system. Hence, Debian package management can get less than
    trivial but most definately rules! 🙂

    Review by Osamu Aoki < osamu@debian.org > Thu Dec 26 07:22:28 2002

    First, my word of warning. I saw many people encounter trouble by setting “APT::Default-Release” in /etc/apt/apt.conf or setting “-t stable” on the command line of apt-get command. These set Pin-Priority to 990 overriding values in /etc/apt/preferences. So do not do this for downgrade.

    I see Auke’s effort and its result to be very good. Analysis of the packages which did not get downgraded are:

    • These packages are only availabe in testing and can not be downgraded.

      debian-reference-en/testing uptodate 1.05-2
      debian-reference-common/testing uptodate 1.05-2

    • These packages are availabe in testing and needed to access recent enhancements. (This is a choice made by Auke.)

      e2fsprogs/testing uptodate 1.29+1.30-WIP-0930-1
      gnupg/testing uptodate 1.2.0-1

    • These packages are required to satisfy above packages (“Depends:” entry in
      control file).

      libc6-dev/testing uptodate 2.2.5-14.3
      libc6/testing uptodate 2.2.5-14.3
      locales/testing uptodate 2.2.5-14.3
      libdb1-compat/testing uptodate 2.1.3-7

    I would have pinned the all these packages which was needed to be
    from testing version by adding the following to /etc/apt/preferences
    for each packages:

    Package: e2fsprogs
    Pin: release a=testing
    Pin-Priority: 1002

    This should enable me to continuously in-sync with testing for these
    programs. If you do not need update, just do not run “update”. But at the same time, keeping mixed system tends to pull libc6 update etc. into system. Sometimes, it is not desired. So think about recompile those packages if possible.

    In my previous experiences, libc6 and its friends always needed to be
    updated if any newer packages needed to be installed to the system.
    Also, Perl and Bash needed to be newer to support some newer packages in stable/testing mixed environment during the days of potato/woody. Sometimes newer kernel requires new gcc and its friends too.

    FYI: I have been conservative on upgrading daemon programs while aggressive on end-user gui application. Also security issues using testing or unstable needs to be reminded for the folks who use those programs in testing and unstable.

    Happy life with Debian.

    [ Please login, or register ]

    Subject: More simple – worked for me
    Author: gragnar
    Date: Thursday, 2003/01/02 – 05:13
    I would like to thank all for interesting comments

    I had only a few unstable packages installed

    What worked for me was:
    to create /etc/apt/preferences
    ————————-
    Package:*
    Pin: release a=stable
    Pin-priority: 1001

    Package:*
    Pin: release a=unstable
    Pin-priority: 99
    ————————-

    And then to make /etc/apt/apt.conf
    ————————-
    DPkg
    {
    Options {“–force-overwrite”;”–force-downgrade”;}
    }
    ————————-

    I do not know about the effect of the preferences file
    but at least it was there when the downgrade worked.

    stable and unstable in the sources.list

    Well, I then used dselect (yes I still use dselect)

    Update
    Select (unselecting some offered new packages)
    Install

    That downgraded libc6 and removed something that the
    newer unstable libc6 depends on.

    Best
    gragnar

    Support freedom – give bandwidth and disk space to freenet !

    [ Please login, or register ]

    Subject: Plenty of Huge Problems with this Article
    Author: JNelson
    Date: Monday, 2002/12/23 – 19:03
    First off, several of the ‘sed’ lines simply don’t work. And I didn’t know enough about sed to fix it myself. When formatting the complete list I had to use a tool called txt2html. Second, several of the URLs he gave out simply don’t exist. It seems like the guy was just recalling what he did off the top of his head. I was downgrading from unstable, and several packages simply refused to downgrade, despite the –force options, namely libc6. I ended up having to use the pin features explained in apt_preferences(5). It was a lot simpler, and less painful once I did that (which I should’ve done in first place). There were still some major hicups, notably when fileutils, textutils, etc. wanted to overwrite files from the coreutils package. However, after a long disasterous ordeal, I did finally manage to downgrade my system to something resembling stable. I really wish I hadn’t read this article and just asked a few of my friends in the first place.
    [ Please login, or register ]

     

    Subject: Yeah…
    Author: robot101
    Date: Monday, 2002/12/23 – 23:18
    I wouldn’t have posted this article either.

    Robster is a monkey
    [ Please login, or register ]

    Subject: Alternate ways
    Author: hjhornbeck
    Date: Sunday, 2002/12/15 – 03:01
    I was pretty sure there were better ways of downgrading, but as mentioned I couldn’t really find anything about it. So I drafted this as my way to help out anyone else in this situation.

    I was hoping my way would at least trigger some discussion about the pros and cons of downgrading. Instead, I’ve learned two other ways of doing the same thing, and a little more about dpkg and apt.

    Now anyone wanting to try this can choose between three different methods, without puzzling over manpages. You’ve all done a wonderful job of helping out anyone else in the same situation. Congrats!

    HJ Hornbeck

    [ Please login, or register ]

     

    Subject: Thanks for stepping to the plate
    Author: bignose
    Date: Sunday, 2002/12/15 – 21:56
    For all the comments your article received along the lines of “Why not do it this way?”, you’re the one who actually went to the effort to document the process. Thanks.

    As you said, the information is now out there to help people, and the suggestions it has drawn from the “differently motivated” among us have also given more options for performing this task.

    [ Please login, or register ]

     

    Subject: Another small shell scripting issue
    Author: era
    Date: Thursday, 2002/12/19 – 11:20
    Just to hopefully make this a little bit more robust, it would be best to replace for f in `backticks` with backticks | while read f — that way you save memory and avoid the risk of having the backticks produce more output than your shell and kernel are prepared to handle.

    See also http://www.iki.fi/era/unix/award.html

    Oh, and var=`backticks`; echo moo $var can usually also be rephrased without the echo and the backticks.

    Agree with the previous poster’s comments — thanks for a valuable contribution. Hope this little addition can help anyone with a huge list of installed packages somewhere down the road.

    [ Please login, or register ]

    Subject: I think this might be an easier way…
    Author: Stral.net
    Date: Saturday, 2002/12/14 – 12:49
    for x in `dpkg –get-selections | awk ‘{ print $1 }’ `; do cat /var/lib/apt/lists/debianmirror_*_stable_Packages | grep ^Package: $x$ ; done | awk ‘{ print $1 “/stable” }’ >stablestuff

    then

    apt-get install `cat stablestuff `

    substitute the correct filename for debianmirror_*_stable_Packages of course
    what this will do is try to install the stable release for every package that appears in the stable Packages file for your mirror.
    apt will then figure out what needs to be removed and what extra stuff to install… i’ve gone from stable->frozen->unstable and back again a couple of times… mainly cos i wasn’t happy with gnome2… but anyway…

    [ Please login, or register ]

    Subject: if you do…
    Author: pattryn
    Date: Tuesday, 2002/12/10 – 16:55
    Hello,

    This script looks good but it’s more easy if after change your sources.list to stable you do:

    apt-get update
    apt-get –reinstall -y install `dpkg –get-selections`

    Not checked but I’m pretty sure that it will work.

    [ Please login, or register ]

     

    Subject: dpkg –get-selections will pr
    Author: termos
    Date: Tuesday, 2002/12/10 – 18:01
    dpkg –get-selections will print ‘install’ and ‘deinstall’ to, but nice command.
    Just to change it with:

    dpkg –get-selections | awk -F’ ‘ ‘{print $1}’
    or
    dpkg –get-selections | sed -e ‘/s/deinstall/index.html’| sed -e ‘/s/install/index.html’

    Guess the first one will work best anyway.

    [ Please login, or register ]

     

    Subject: mistake
    Author: pattryn
    Date: Wednesday, 2002/12/11 – 17:17
    Oh, yes. Little mistake:

    apt-get –reinstall -y install `dpkg –get-selections|grep -v deinstall|cut -f 1`

    Pattryn.

    [ Please login, or register ]

     

    Subject: awk
    Author: Joy
    Date: Tuesday, 2002/12/10 – 18:48
    And you don’t need to specify the field separator, anyway. 🙂
    [ Please login, or register ]

    Subject: libc6 replacement fails
    Author: marcel
    Date: Tuesday, 2002/12/10 – 13:43
    At first sight this looked a good solution to me, however when I perform the steps, I’ll get the folowing error during the downgrade of libc6:

    dpkg: error processing libc6_2.2.5-6_i386.deb (–install):
    trying to overwrite `/lib/libdb1-2.2.5.so’, which is also in package libdb1-compat
    dpkg-deb: subprocess paste killed by signal (Broken pipe)
    Errors were encountered while processing:
    libc6_2.2.5-6_i386.deb

    The package libdb1-compat has been introduced in Testing/Unstable for compatibility with libc6 2.2. You can’t remove this package (it’s required by libc6 *smile*), I tried removing the file, but that doesn’t work. Also I’ve downloaded the stable apt-list (apt-get update). I’m stuck right now. Anyone got any sugestions?

    Thanx in advance.

    Marcel Lemmen

    Search the newsgroups at http://alt.binaries.nl

    [ Please login, or register ]

     

    Subject: remove libdb1-compat before downgrading libc6
    Author: rescdsk
    Date: Tuesday, 2002/12/10 – 18:19
    You need to remove libdb1-compat… You can do this using dpkg. man dpkg for info. I think the command line would be something like

    dpkg -r libdb1-compat –force-depends=yes

    I’m not sure if that is the exact argument, but it’s –force-something.

    Good luck!

    [ Please login, or register ]

    Subject: What is wrong here?
    There co
    Author: termos
    Date: Tuesday, 2002/12/10 – 12:57
    What is wrong here?
    There could be a thousand things you could do to get this
    working. You don’t have to tell about every possible way this
    could be done, the writer of this chose to do it this way. Maybe it
    was not the best way to do it, and I really don’t se any of you
    saying it was any good.
    I think it was very well written, some of the things (for example the
    dpkg-awk) could be done diffrently, I agree.

    It was almost funny to read through the replies, when you were only
    telling him that he could do that and that different. There is almost
    always a better way to do it, why don’t you try to write something
    on your own insted of correcting others?

    [ Please login, or register ]

     

    Subject: Providing alternative ways is not dissing
    Author: asjo
    Date: Tuesday, 2002/12/10 – 18:12
    Uhm, did you ever stop to consider that people providing alternative methods could be doing so to actually help the author of the article or show him other, perhaps easier, routes he didn’t think of, so he can go through less trouble the next time around?
    [ Please login, or register ]

     

    Subject: just trying to offer other thoughts…
    Author: ColdPack
    Date: Wednesday, 2002/12/11 – 17:58
    I haven’t had to do a great deal of downgrading but I have done it (once because the ‘latest’ xfree didn’t play nicely with my video card… and a few other times).

    What I did was read throught the apt manual and found that I could simply “apt-get install xfree86-common=4.2.1-1” (or whatever version I wished to downgrade to). It would spit back the few dependency problems, so I would add those packages into that same command with the appropriate version number (with X they all will likely share the same version number). It would do the downgrade just as easily as installing something in the ‘normal’ fasion.

    Synaptic sometimes is helpful for tracking down exact version numbers and dependencies. 🙂

    CP

    [ Please login, or register ]

     

    Subject: Yes, it is nice to help out,
    Author: termos
    Date: Tuesday, 2002/12/10 – 18:37
    Yes, it is nice to help out, but when I read through the replies I saw
    only comments on what could be changed. So, maybe that is not
    everything someone want to hear.
    [ Please login, or register ]

    Subject: List of packages available? Already on your system.
    Author: bignose
    Date: Tuesday, 2002/12/10 – 01:12
    > The first step was to get a list of all the packages in Stable.
    > The first place I thought to look was Debian’s website

    Why? With ‘stable‘ in your sources.list, when you ‘apt-get update‘, what is it you’re doing if not getting a list of all the packages available in stable?

    As for querying that data, I think ‘apt-cache show dpkg-awk‘ may be interesting to you.

    Why go to the website to download data already on your system?

    [ Please login, or register ]

    Subject: Easy to get a list of your installed packages
    Author: bignose
    Date: Tuesday, 2002/12/10 – 01:06
    > Now I needed a list of every package installed[…]
    > dpkg clips package names, so it can’t help.

    Not true; ‘dpkg -l‘ will clip names to fit a tabular format, but a look at ‘man dpkg‘ shows that the ‘--get-selections‘ option is what you want.

    $ dpkg –get-selections
    aalib1 install
    aalib1-dev install
    abcde install
    ae deinstall
    abiword install
    abiword-common install
    […]

    Every package touched by your dpkg, with its requested status. Filter through grep '<install$' (to match only the word ‘install’ at the end of the line) and you’ve got your list.

    Alternatively, ‘apt-cache show apt-show-versions‘ for something even nicer.

    Think: if it’s useful to know, and if the data is there already, somebody probably already wrote a way to get it.

    [ Please login, or register ]

     

    Subject: RE: Easy to get a list of your installed packages
    Author: Freaky-namuH
    Date: Tuesday, 2002/12/10 – 03:16
    > Not true; ‘dpkg -l’ will clip names to fit a tabular format,
    > but a look at ‘man dpkg’ shows that the ‘–get-selections’ option is what you want.

    Or you could just use the COLUMNS environmental variable

    COLUMNS=100 dpkg -l (from ‘man dpkg‘)

    [ Please login, or register ]

    Subject: pinning
    Author: dopey
    Date: Tuesday, 2002/12/10 – 00:47
    it should have been easier, i’d have though, to use the “pinning” feature.

    Package: *
    Pin: release a=stable
    Pin-Priority: 2000

    then run “apt-get upgrade”

    [ Please login, or register ]

     

    Subject: Strands at dpkg…
    Author: KjetilK
    Date: Wednesday, 2002/12/11 – 15:58
    I’ve asked on various mailing lists about this, since I accidentally let my main server track testing a couple of weeks after Woody was released.

    I pretty much tried the method you suggested, but ran into problems, and when I asked the response was pretty much: “Downgrades are not supported”.

    Right now, I’m just getting
    0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    …if I go apt-get -u dist-upgrade (as per the APT HOWTO), but back then, the downgrade stranded on trying to downgrade dpkg. Apparently, it couldn’t downgrade dpkg, because dpkg was in use, obviously.

    Is there a way around this? Perhaps I have to use force? I’m, a peaceful man, and I don’t like the use of force, so if there is a kinder, gentler way, I would love to hear about it.

    [ Please login, or register ]

     

    Subject: Downgrading dpkg
    Author: hjhornbeck
    Date: Thursday, 2002/12/19 – 23:16
    I never had to downgrade dpkg, thankfully, but there may be a way around that:

    1. Back up /var/lib/dpkg, and have a .deb of your current version of dpkg, in case this doesn’t work.
    2. Find a Debian-based bootdisk with dpkg on it, and boot from it.
    3. Mount your root filesystem on /mnt/target, or any other convenient directory. If you put /usr, /var, /etc, or /sbin onto other partitions, mount them in their proper places under that directory.
    4. Try: dpkg --root=/mnt/target -i [older dpkg .deb]
      That should overwrite the newer dpkg’s files with the older.

    I haven’t tested it, so I can’t confirm it works. Some other command line options to try are "–instdir=" and "–admindir="; more info can be found in dpkg’s man page.

    HJ Hornbeck

    [ Please login, or register ]

     

    Subject: How downgrade from unstable to stable?
    Author: svs
    Date: Tuesday, 2002/12/10 – 10:56
    I have to downgrade from unstable to stable.
    The main problem that I need install Oracle server 9.2.
    Oracle requires glibc 2.2.
    I afraid problems in downgrading glibc from 2.3.1 to 2.2.5.
    Do anybody can help me?
    [ Please login, or register ]

     

    Subject: simple script
    Author: pako
    Date: Friday, 2005/12/23 – 00:08
    # cut
    #!/bin/bash

    if [ !$1 ]; then
    echo “Give a host from can i install packages, like:”
    echo “$0 ftp.debian.org”
    echo “Ofcourse you must have this host in /etc/apt/sources.conf”
    exit
    fi

    PKGS=`dpkg –get-selections | grep -v deinstall | cut -f 1`

    n=0
    for i in $PKGS
    do
    VERS=`apt-cache showpkg $i | grep $1 | grep stable | cut -d ‘(‘ -f 1`
    if [ $VERS ]; then
    tab[$n]=$i=$VERS
    n=$[n + 1]
    fi

    done

    apt-get install ${tab[@]}
    # /cut

    This simple script can downgrade from mixed system (stable/testing/unstable) to stable system. Enjoy!

    [ Please login, or register ]

     

    Subject: recompile
    Author: d00d
    Date: Thursday, 2002/12/12 – 12:45
    just rebuild oracle for glibc 2.3.1 and you won’t need to downgrade
    [ Please login, or register ]

     

    Subject: RE: recompile
    Author: svs
    Date: Sunday, 2002/12/15 – 12:19
    Of cause I relinked Oracle.
    I did this eigther with glibc 2.3.1 and with glibc 2.2.5.
    Nothing help.
    [ Please login, or register ]

    Search articles



    Category
    ·News (405)
    ·Features (5)
    ·Site News (16)
    ·HOWTOs (78)
    ·Tips (21)
    ·Opinion (29)
    ·Q & A (34)
    ·Sponsorship (1)
    ·Press Releases (5)

    Log in
    Username:

    Password:

    Remember me

    » Register
    » New password

    Debian Security Announcements
    DSA-943 perl
    DSA-942 albatross
    DSA-903 unzip
    DSA-941 tuxpaint
    DSA-940 gpdf
    DSA-939 fetchmail
    DSA-938 koffice
    DSA-937 tetex-bin
    DSA-936 libextractor
    DSA-935 libapache2-mod-auth-pgsql

    Planet Debian
    Wouter Verhelst: On flames.
    Joachim Breitner: Fixing my planet.debian.org subscription
    Steve Kemp: She has the blood of reptile just underneath her skin
    Pierre Habouzit: Married …
    Pierre Habouzit: whitelister 0.4 (SPF) and aaege ….
    Pierre Habouzit: kde 3.4.1 upload
    Holger Levsen: In case you are running OpenWRT
    Michael Janssen: Shiny roofs are good for the environment!
    Matthew Palmer: Work it out yourself, dammit!
    Axel Beckert: Tell me which music you like and I tell who you are

    Debian Administration
    How do I prevent rebuilt packages from being upgraded?
    Disabling the print-screen key inside X?
    Monitoring your bandwidth usage with vnstat
    Ruby on Rails on Debian
    Choice for Virtual Private Servers?
    Monitoring your hardware’s temperature
    Sending mail with Exim from ‘dialup’ IP
    How to recover GRUB Debian Sarge after reinstalling Windows
    Getting a GUI
    Spam filtering with Pyzor and SpamBayes

    Latest poll: Which release scheme should Debian follow?
    Continue this way (release when ready)
    48%
     
    Give up on releasing
    8%
       
    Split the release up
    8%
       
    Speed the release up
    32%
       
    Crank the workload up (see DebianWiki ReleaseProposals for details on these)
    4%
       

    Total votes: 372
    0 comments · older polls

    home · archives · news feeds · about · polls · search · sections · user account

    Powered by the amazing Drupal

    Debian Planet is not officially related to the Debian Project.
    Debian and the Debian logo are trademarks of Software in the Public Interest, Inc.