How To Install git-annex on Ubuntu 18.04

In this tutorial we learn how to install git-annex on Ubuntu 18.04. git-annex is manage files with git, without checking their contents into git

Introduction

In this tutorial we learn how to install git-annex on Ubuntu 18.04.

What is git-annex

git-annex is:

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

It can store large files in many places, from local hard drives, to a large number of cloud storage services, including S3, WebDAV, and rsync, with a dozen cloud storage providers usable via plugins. Files can be stored encrypted with gpg, so that the cloud storage provider cannot see your data. git-annex keeps track of where each file is stored, so it knows how many copies are available, and has many facilities to ensure your data is preserved.

git-annex can also be used to keep a folder in sync between computers, noticing when files are changed, and automatically committing them to git and transferring them to other computers. The git-annex webapp makes it easy to set up and use git-annex this way.

There are three methods to install git-annex on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install git-annex Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install git-annex using apt-get by running the following command:

sudo apt-get -y install git-annex

Install git-annex Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install git-annex using apt by running the following command:

sudo apt -y install git-annex

Install git-annex Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install git-annex using aptitude by running the following command:

sudo aptitude -y install git-annex

How To Uninstall git-annex on Ubuntu 18.04

To uninstall only the git-annex package we can use the following command:

sudo apt-get remove git-annex

Uninstall git-annex And Its Dependencies

To uninstall git-annex and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove git-annex

Remove git-annex Configurations and Data

To remove git-annex configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge git-annex

Remove git-annex configuration, data, and all of its dependencies

We can use the following command to remove git-annex configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge git-annex

References

Summary

In this tutorial we learn how to install git-annex package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.