How to install gitg version 2.7 under 15.04? [duplicate]

I updated to Ubuntu 15.04. The shipped version of gitg is 3.15.1 - in Ubuntu 14.10 it was 2.7.3.

I really like to install the old version again, since the new version is very inconvenient to handle. How can I install the old version again. It is not provided in the package force version.

I uninstalled the new version. I downloaded the .deb-package from http://packages.ubuntu.com/utopic/amd64/gitg/download , but when I try to install it using the double click, the new version is installed and an error it given:

Package operation failed

The installation or removal of a software package failed.

Selecting previously unselected package gitg.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 241499 files and directories currently installed.)
Preparing to unpack .../gitg_0.2.7-3_amd64.deb ...
Unpacking gitg (0.2.7-3) ...
dpkg: dependency problems prevent configuration of gitg:
 libgit2-glib-1.0-0:amd64 (0.22.0-0ubuntu1) breaks gitg (<< 3.15.1) and is installed.
  Version of gitg to be configured is 0.2.7-3.

dpkg: error processing package gitg (--install):
 dependency problems - leaving unconfigured
Processing triggers for gnome-menus (3.10.1-0ubuntu5) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.14-0ubuntu1) ...
Processing triggers for libglib2.0-0:i386 (2.44.0-1ubuntu3) ...
Processing triggers for libglib2.0-0:amd64 (2.44.0-1ubuntu3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 gitg

When I click repair afterwards, then the version 3.15.1 is installed. If I don't click repair, than 2.7.3 is installed (and runnable).

So, is there a better way to install an old version of gitg?


Open a terminal and run these commands:

sudo dpkg -i gitg_0.2.7-3_amd64.deb
sudo apt-get remove libgit2-glib-1.0-0

and set on hold with:

sudo apt-mark hold gitg

The whole is reversed with

sudo apt-mark unhold gitg
sudo apt-get upgrade

This package can be obtained from https://packages.debian.org/jessie/amd64/gitg/download. (If you're on a different architecture than amd64, select it here.)