Installing KeePassX 0.4 on Ubuntu 16.04

Download the KeePassX 0.4 .DEB from

sudo dpkg -i keepassx_0.4.3+dfsg-0.1ubuntu1_amd64.deb

sudo apt-get install -f

To prevent it from being upgraded to version 2, in Synaptic, select keepassx and, from the menu, select “Package” -> “Lock Version”.¬† Also make sure Software Updater isn’t set to automatically install updates, as it does not respect the version lock.