How To Install golang-github-spf13-viper-dev on Debian 10

Learn how to install golang-github-spf13-viper-dev on Debian 10 with this tutorial. golang-github-spf13-viper-dev is Go configuration with fangs

Introduction

In this tutorial we learn how to install golang-github-spf13-viper-dev on Debian 10.

What is golang-github-spf13-viper-dev

golang-github-spf13-viper-dev is:

Viper is a complete configuration solution for Go applications including 12-Factor apps. It is designed to work within an application, and can handle all types of configuration needs and formats. It supports:

  • setting defaults
  • reading from JSON, TOML, YAML, HCL, and Java properties config files
  • live watching and re-reading of config files (optional)
  • reading from environment variables
  • reading from remote config systems (etcd or Consul), and watching changes
  • reading from command line flags
  • reading from buffer
  • setting explicit values

Viper can be thought of as a registry for all of your applications configuration needs.

There are three methods to install golang-github-spf13-viper-dev 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-github-spf13-viper-dev 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-github-spf13-viper-dev using apt-get by running the following command:

sudo apt-get -y install golang-github-spf13-viper-dev

Install golang-github-spf13-viper-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install golang-github-spf13-viper-dev using apt by running the following command:

sudo apt -y install golang-github-spf13-viper-dev

Install golang-github-spf13-viper-dev 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-github-spf13-viper-dev using aptitude by running the following command:

sudo aptitude -y install golang-github-spf13-viper-dev

How To Uninstall golang-github-spf13-viper-dev on Debian 10

To uninstall only the golang-github-spf13-viper-dev package we can use the following command:

sudo apt-get remove golang-github-spf13-viper-dev

Uninstall golang-github-spf13-viper-dev And Its Dependencies

To uninstall golang-github-spf13-viper-dev and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove golang-github-spf13-viper-dev

Remove golang-github-spf13-viper-dev Configurations and Data

To remove golang-github-spf13-viper-dev configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge golang-github-spf13-viper-dev

Remove golang-github-spf13-viper-dev configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge golang-github-spf13-viper-dev

Dependencies

golang-github-spf13-viper-dev have the following dependencies:

References

Summary

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