How To Install golang-glide on Debian 9

In this tutorial we learn how to install golang-glide on Debian 9. golang-glide is Vendor package management for Go

Introduction

In this tutorial we learn how to install golang-glide on Debian 9.

What is golang-glide

golang-glide is:

Glide is comparable to tools like Cargo, npm, Composer, Bundler, pip, Maven but for Go. It manages vendored packages with ease.

Packages to be vendored are listed in a configuration file at the root of a project along with the appropriate restriction on versions and Glide will download the most recent versions satisfying the constraints into the vendor directory. It will write a lock file to record the exact versions chosen.

There are three methods to install golang-glide on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install golang-glide Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install golang-glide

Install golang-glide Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install golang-glide

Install golang-glide 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install golang-glide

How To Uninstall golang-glide on Debian 9

To uninstall only the golang-glide package we can use the following command:

sudo apt-get remove golang-glide

Uninstall golang-glide And Its Dependencies

To uninstall golang-glide and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove golang-glide

Remove golang-glide Configurations and Data

To remove golang-glide configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge golang-glide

Remove golang-glide configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge golang-glide

Dependencies

golang-glide have the following dependencies:

References

Summary

In this tutorial we learn how to install golang-glide package on Debian 9 using different package management tools: apt, apt-get and aptitude.