How to force downgrade of packages on Ubuntu (Karmic)?

Solution 1:

If you are not afraid do get your hands dirty, the best way to do this is :

apt-cache show packagename

It will show you all the different version of the package that you can install, according to your sources.list definition. You will get something like that ( this is how it looks for me ):

root@shiny-desktop:/home/shiny# apt-cache show libpulse-browse0
Package: libpulse-browse0
Status: install ok installed
Priority: optional
Section: sound
Installed-Size: 100
Maintainer: Ubuntu Core Developers <[email protected]>
Architecture: i386
Source: pulseaudio
Version: 1:0.9.15-4ubuntu2~ppa1
Depends: libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libc6 (>= 2.4), libcap1, libdbus-1-3 (>= 1.0.2), libgdbm3, libice6 (>= 1:1.0.0), libpulse0 (= 1:0.9.15-4ubuntu2~ppa1), libsm6, libwrap0 (>= 7.6-4~), libx11-6, libxtst6
Description: PulseAudio client libraries (zeroconf support)
 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
 WIN32 systems. It is a drop in replacement for the ESD sound server with
 much better latency, mixing/re-sampling quality and overall architecture.
 .
 Client libraries used by applications that access a PulseAudio sound server
 via PulseAudio's native interface.
 .
 This package adds support for zeroconf (aka. Avahi, mdns) discovery of
 PulseAudio sinks and sources by client applications.
Homepage: http://www.pulseaudio.org
Original-Maintainer: Pulseaudio maintenance team <[email protected]>

Package: libpulse-browse0
Priority: optional
Section: sound
Installed-Size: 144
Maintainer: Ubuntu Core Developers <[email protected]>
Original-Maintainer: Pulseaudio maintenance team <[email protected]>
Architecture: i386
Source: pulseaudio
Version: 1:0.9.14-0ubuntu20.2
Depends: libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libc6 (>= 2.4), libcap2 (>= 2.11), libgdbm3, libice6 (>= 1:1.0.0), libpulse0 (>= 0.9.14), libsm6, libx11-6
Filename: pool/main/p/pulseaudio/libpulse-browse0_0.9.14-0ubuntu20.2_i386.deb
Size: 31522
MD5sum: d7bf325c04432507420551d7c4e04737
SHA1: 537037b6cdcf2e36ab91fff73a543b2bc9a9d2f6
SHA256: 25c9a83f669f3f14b0fdd59141fc048e3053ccdcae5817f338260342ae1164d0
Description: PulseAudio client libraries (zeroconf support)
 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
 WIN32 systems. It is a drop in replacement for the ESD sound server with
 much better latency, mixing/re-sampling quality and overall architecture.
 .
 Client libraries used by applications that access a PulseAudio sound server
 via PulseAudio's native interface.
 .
 This package adds support for zeroconf (aka. Avahi, mdns) discovery of
 PulseAudio sinks and sources by client applications.
Homepage: http://www.pulseaudio.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-dvd-live, edubuntu-desktop, xubuntu-live, mobile-mid, mobile-netbook-remix

Package: libpulse-browse0
Priority: optional
Section: sound
Installed-Size: 144
Maintainer: Ubuntu Core Developers <[email protected]>
Original-Maintainer: Pulseaudio maintenance team <[email protected]>
Architecture: i386
Source: pulseaudio
Version: 1:0.9.14-0ubuntu20
Depends: libavahi-client3 (>= 0.6.16), libavahi-common3 (>= 0.6.16), libc6 (>= 2.4), libcap2 (>= 2.11), libgdbm3, libice6 (>= 1:1.0.0), libpulse0 (>= 0.9.14), libsm6, libx11-6
Filename: pool/main/p/pulseaudio/libpulse-browse0_0.9.14-0ubuntu20_i386.deb
Size: 31516
MD5sum: 63d4937b22f83cff5cc5be101caa3f27
SHA1: bb436fa7bc14eaad31a9f3778f1a887d96e2521d
SHA256: 1f3a5e7a4376c0ee406f30a1c5ec03dc5f484dc059ceb61462516bb728c6c1c5
Description: PulseAudio client libraries (zeroconf support)
 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
 WIN32 systems. It is a drop in replacement for the ESD sound server with
 much better latency, mixing/re-sampling quality and overall architecture.
 .
 Client libraries used by applications that access a PulseAudio sound server
 via PulseAudio's native interface.
 .
 This package adds support for zeroconf (aka. Avahi, mdns) discovery of
 PulseAudio sinks and sources by client applications.
Homepage: http://www.pulseaudio.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-dvd-live, edubuntu-desktop, xubuntu-live, mobile-mid, mobile-netbook-remix

Just check on the different version available to you, and then do :

apt-get install packagname=version

Again as example to the output above :

apt-get install ibpulse-browse0=1:0.9.14-0ubuntu20

As you can see my pulseaudio is from a ppa on launchpad so if i wanted to downgrade/revert back to the original one supplied by jaunty, i'd do the mentioned above with all the pulseaudio packages that i installed.

Solution 2:

In /etc/apt/preferences:

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

Then aptitude install pulseaudio (and any other packages that won't get automatically downgraded as a dependency).

This may well cause problems down the line (downgrades aren't officially supported or well-tested) but this will at least get the versions down to jaunty ones.