How To Install libduration-ocaml on Ubuntu 22.04

In this tutorial we learn how to install libduration-ocaml on Ubuntu 22.04. libduration-ocaml is conversions to various time units for OCaml (runtime)

Introduction

In this tutorial we learn how to install libduration-ocaml on Ubuntu 22.04.

What is libduration-ocaml

libduration-ocaml is:

A duration is represented in nanoseconds as an unsigned 64 bit integer. This has a range of up to 584 years. Functions provided check the input and raise on negative or out of bound input.

This package contains runtime files.

There are three methods to install libduration-ocaml on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libduration-ocaml Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install libduration-ocaml

Install libduration-ocaml Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libduration-ocaml

Install libduration-ocaml 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install libduration-ocaml

How To Uninstall libduration-ocaml on Ubuntu 22.04

To uninstall only the libduration-ocaml package we can use the following command:

sudo apt-get remove libduration-ocaml

Uninstall libduration-ocaml And Its Dependencies

To uninstall libduration-ocaml and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove libduration-ocaml

Remove libduration-ocaml Configurations and Data

To remove libduration-ocaml configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge libduration-ocaml

Remove libduration-ocaml configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libduration-ocaml

References

Summary

In this tutorial we learn how to install libduration-ocaml package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.