Disabling a PPA and downgrading all related packages

After installing the Karmic beta (more on that later) and subsequently reinstalling Jaunty, all of a sudden I’m having some odd problems with my multi-monitor setup that I did not have before. That last point is what makes it so annoying.

This despite the fact that I personally haven’t touched anything else. I’m using the same xorg.conf and the home directory has been remounted as it was on a different partition.

Note that my multi-monitor setup itself is quite simple. I simply disable the LCD display of my laptop and show everything on my main screen (a Samsung SyncMaster 2443BW) which is connected to the laptop via a plain old VGA cable.

So after trying some things I’ve decided to disable one of the repositories I use that supplies me with the latest stable updates from anything X related (such as the Intel drivers). However, this doesn’t automatically downgrade all the installed packages, to do that you have to explicitly downgrade.

Luckily I found somebody else that wanted to do the exact same thing and so ended up using:

grep /var/lib/apt/lists/Package ppa.launchpad.net_ubuntu-x-swat_x-updates_ubuntu_dists_jaunty_main_binary-i386_Packages \
 | sed -e 's/^Package: //' \
 | xargs dpkg-query -W 2> /dev/null \
 | grep '\t.' \
 | sed -e 's/\t.*$//' > /tmp/x-updates.packages
sudo dpkg --force-all -r `cat /tmp/x-updates.packages`
sudo apt-get -f install `cat /tmp/x-updates.packages`

Note that you have to do the first step with the repository enabled and the last two (dpkg and apt-get) with the repository disabled.

Leave a Reply