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

unix
operations
installation
knowledge-base

(Stefan Armbruster) #1

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

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