How To Install environment-modules on Debian 10

Learn how to install environment-modules on Debian 10 with this tutorial. environment-modules is Modular system for handling environment variables

Introduction

In this tutorial we learn how to install environment-modules on Debian 10.

What is environment-modules

environment-modules is:

The Modules package provides for the dynamic modification of a user’s environment via modulefiles. Each modulefile contains the information needed to configure the shell for an application. Once the Modules package is initialized, the environment can be modified dynamically on a per-module basis using the module command which interprets modulefiles. Typically modulefiles instruct the module command to alter or set shell environment variables such as PATH, MANPATH, etc. modulefiles may be shared by many users on a system and users may have their own collection to supplement or replace the shared modulefiles. The modules environment is common on SGI/Crays and many workstation farms.

There are three methods to install environment-modules 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 environment-modules Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install environment-modules

Install environment-modules Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install environment-modules

Install environment-modules 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 environment-modules using aptitude by running the following command:

sudo aptitude -y install environment-modules

How To Uninstall environment-modules on Debian 10

To uninstall only the environment-modules package we can use the following command:

sudo apt-get remove environment-modules

Uninstall environment-modules And Its Dependencies

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

sudo apt-get -y autoremove environment-modules

Remove environment-modules Configurations and Data

To remove environment-modules configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge environment-modules

Remove environment-modules configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge environment-modules

Dependencies

environment-modules have the following dependencies:

References

Summary

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