Automate Everything: Ruby, Linux and other hints, tips and tricks.

Prevent apt-get from upgrading a package on Ubuntu

Yesterday I updated my Ubuntu to Jaunty Jackalope and it overwrote my custom version of rxvt-unicode that supports 256 colors. I got it following this entry Get rxvt-unicode with 256 color support on Ubuntu.

To recover it I reinstalled the custom deb package. It worked, but every time I try to update my packages apt-get tries to “upgrade” rxvt-unicode too discarding my version.

I found the solution here: Keep a package at specified version. It’s just a matter of pinning a package. Just go:

sudo vim /etc/apt/preferences

And add the following:

Package: rxvt-unicode
Pin: version 9.05*
Pin-Priority: 1001

And no more whinning : )

You can follow any responses to this entry through the RSS 2.0 feed.