How to Install or Uninstall dh-fortran-mod on Ubuntu 22.04

Updated: October 20, 2022

Modules were introduced in the 1990 revision of the Fortran standard. When the Fortran compiler processes a source file containing a module, it produces both an object file and a ‘.mod’ file. The latter plays a role similar to header files in C, since it is needed when compiling other source files which make use of the module. In this guide, I will show you how to install dh-fortran-mod on Ubuntu 22.04.


  • OS: Ubuntu 22.04 is needed for dh-fortran-mod to work
  • Privileges: Ensure that you are able to execute the sudo commands line.

Prerequisites to install dh-fortran-mod on Ubuntu 22.04

Install dh-fortran-mod Ubuntu 22.04

dh-fortran-mod is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install dh-fortran-mod using APT

This is a popular method for installing Ubuntu packages since it’s simple to understand, even if you’re new to Linux. Following these instructions to install dh-fortran-mod on your Ubuntu.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt-get -y update

Step 2: Start installing the packages on Ubuntu 22.04. You can now install dh-fortran-mod Ubuntu by executing this command in the terminal.

sudo apt-get -y install dh-fortran-mod

Install dh-fortran-mod using Aptitude

With Aptitude, users can view a list of available packages and manage their installation, upgrade, and removal of packages. If you didn’t install it on Ubuntu, you need to install it by executing this command.

sudo apt -y install aptitude

After that, you can now install dh-fortran-mod, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Launch the terminal and enter the following Linux command:

sudo apt-get update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install dh-fortran-mod Ubuntu by pasting this command into the terminal and pressing Enter.

sudo aptitude -y install dh-fortran-mod

Uninstall dh-fortran-mod on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

You can uninstall dh-fortran-mod on Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove dh-fortran-mod

To uninstall dh-fortran-mod and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge dh-fortran-mod


In this tutorial, I showed you ways to install dh-fortran-mod on Ubuntu 22.04 and ways to uninstall dh-fortran-mod too. Please contact me if you require any assistance. I’d be delighted to respond.