My name is Philipp C. Heckel and I write about nerdy things.

Unison 2.27.57 on Debian Etch and Ubuntu Hardy

Linux, Synchronization

Unison 2.27.57 on Debian Etch and Ubuntu Hardy

The good thing about the file sync tool Unison is, that it’s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server.

Well, the bad thing about Unison on the other hand is, that its backwards compatibility is anything but great, so that you have to make sure that everybody in the team uses the same version. And this can be tricky depending on what system you are using.

My home system is Ubuntu Hardy, the remote server system is Debian Etch. Both come with Unison 2.16.13 which would be great if not Apple’s new Leopard brings the newest version 2.27.57. Long story short, I needed the newest version on Hardy and Etch.

Unison on Hardy

To install the newest version of Unison on Hardy, it’s the best to just use the existing Backport package.

First, add the backports to the apt-sources, using your favorite editor, e.g. vi or nano:

Look for backports and uncomment/add the following lines:

Then just install the backport using apt-get:

After installing you probably should remove the added lines from the sources.list-file. Otherwise the update-manager wants to install all available backports which is probably not what you want.

Debian Etch

Update 30/07/08: Before reading my post, please have a look at the much easier method described by Andrew in the user comments. Only if this doesn’t work, you might want to have a look at my post.

Unison 2.27.57 binary for Debian Etch:
If you don’t want to compile the binary on your own (as described in the following paragraphs), you can download the Unison 2.27.57 binary for Debian Etch here.

Update 30/11/08:
~ 300 downloads so far, no known problems/malfunctions!

It’s much more difficult on an Etch system because no Backport package is available. Therefore you either have to create such a package, which can be annoying and frustrating, or you just compile it on your own and overwrite the binary.

Add the unstable sources and the etch backports to your apt-get sources by editing the file /etc/apt/sources.list (as root!):

Now update apt and install the backport package of ocaml compiler. You also might want to install the debian backports keyring to avoid warning and error messages:

Then get the source package of unison 2.27.57 and make the binary:

Note: For my Etch installation, the make progress failed with some error, but the binary was created successfully anyway. Just have a look whether the unison-binary exists and test if it is working.

Now install the old version of Unison and replace the binary with the new one. Also you might want to remove the lines from /etc/apt/sources.list and uninstall the ocaml compiler.

That’s it! I know that this is not the best solution and that it might be better to create the backports package. But as there are many dependencies to other packages it’s maybe one of the fastest solutions.

I decided to publish the binary here (for the lazy ones): Unison 2.27.57 binary for Debian Etch.


  1. Andrew Challen

    Thanks for your tips they helped me build a .deb to install. After a long time playing around building my own .deb i found that the one in “testing” almost compiles, simply run the following instead of “make” and if you have all the build dependancies installed, a few apt-get’s and you will, it will build you two .deb which you can install with dpkg -i unison*.deb

    awk ‘{gsub(/Build-Depends: .*/, “Build-Depends: cdbs (>= 0.4.23), debhelper (>= 5), dpatch, ocaml-nox (>= 3.09.2-9), liblablgtk2-ocaml-dev (>= 2.6.0-7), chrpath, librsvg2-bin (>= 2.14.4-3), imagemagick”); print $0 > “unison-2.27.57/debian/control”}’ unison-2.27.57/debian/control
    dpkg-buildpackage -rfakeroot

  2. Vladimir Wiedermann

    Thanks for the hints with plink. Anyway, if you do not need to install the 2.27.57 globally, there is a simple solution:

    Download unison 2.27.57 from sid, and unpack unison-2.27.57 binary from downloaded deb file. You need to modify plink-cmd.bat to contact your local binary instead of the global installation, and that’s all.

  3. Charl Botha

    For anyone that needs unison 2.27 on Gutsy as well (Ubuntu 7.10), I’ve backported the DEBs as well:

  4. Carlos Martinez

    Hi Phillip,

    I put your unison 2.27 binary (with full credits to you) in my blog, so to provide a mirror.

    The URL is

    best regards


  5. Tunya

    hi i know that such a comment doesn’t make much sense, BUT YOU JUST SAVED MY LIFE WITH THIS!!! Thank you.

  6. Mike

    Hey, instead of using vi which is a little hard to use(if your not use to cli) to edit a simple text file, you might recomend anther editor, like nano or gedit

  7. Philipp C. Heckel

    Hey Mike,

    thanks for the comment, I just modified the post a little saying that other editors are of course possible. I now use “editor”, which is a symbolic link to the default editor of the system; for Ubuntu this is ‘nano’ I think. You can change this by calling update-alternatives.