Debian / Ubuntu: How to enforce a certain version of neo4j when using debian packages

If you want to run a specific version of Neo4j and install the software via a debian repository you need to use a technique called apt pinning. Otherwise any system update will also update Neo4j to its latest stable version.

As an example assume you want to make sure to stay on 3.3.x versions – effectivly preventing an upgrade to 3.4.x or higher. To use apt pinning create a file /etc/apt.d/preferences.d/neo4j with these contents

Package: neo4j-enterprise
Pin: version 1:3.3.*
Pin-Priority: 1000
Note

Recently the versioning scheme for neo4j debian packages changed and a 1: is used as a prefix.


  • Last Modified: 2020-09-28 18:12:27 UTC by Stefan Armbruster.
  • Relevant for Neo4j Versions: 3.0, 3.1, 3.2, 3.3, 3.4.
  • Relevant keywords unix, installation.