How To Install golang-golang-x-tools on Debian 10

Learn how to install golang-golang-x-tools on Debian 10 with this tutorial. golang-golang-x-tools is supplementary Go tools

Introduction

In this tutorial we learn how to install golang-golang-x-tools on Debian 10.

What is golang-golang-x-tools

golang-golang-x-tools is:

This subrepository holds the source for various packages and tools that support the Go programming language.

Some of the tools, godoc and vet for example, used to be included in the golang-go package. Others, including the Go oracle and the test coverage tool, can be fetched with “go get”.

Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs.

There are three methods to install golang-golang-x-tools on Debian 10. 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-golang-x-tools 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-golang-x-tools using apt-get by running the following command:

sudo apt-get -y install golang-golang-x-tools

Install golang-golang-x-tools Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install golang-golang-x-tools

Install golang-golang-x-tools 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-golang-x-tools using aptitude by running the following command:

sudo aptitude -y install golang-golang-x-tools

How To Uninstall golang-golang-x-tools on Debian 10

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

sudo apt-get remove golang-golang-x-tools

Uninstall golang-golang-x-tools And Its Dependencies

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

sudo apt-get -y autoremove golang-golang-x-tools

Remove golang-golang-x-tools Configurations and Data

To remove golang-golang-x-tools configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge golang-golang-x-tools

Remove golang-golang-x-tools configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge golang-golang-x-tools

Dependencies

golang-golang-x-tools have the following dependencies:

References

Summary

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