How To Install ruby-uuid on Ubuntu 18.04

In this tutorial we learn how to install ruby-uuid on Ubuntu 18.04. ruby-uuid is UUID generator for Ruby

Introduction

In this tutorial we learn how to install ruby-uuid on Ubuntu 18.04.

What is ruby-uuid

ruby-uuid is:

UUID generator for producing universally unique identifiers based on RFC 4122. These identifiers are useful in distributed applications like diaspora.

A UUID is 128 bit long, and consists of a 60-bit time value, a 16-bit sequence number and a 48-bit node identifier.

To guarantee that UUIDs are unique across all machines in the network, the IEEE 802 MAC address of the machine’s network interface card is used as the node identifier.

Learn more about using this library from /usr/share/ruby-uuid/README.rdoc

There are three methods to install ruby-uuid on Ubuntu 18.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 ruby-uuid Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install ruby-uuid

Install ruby-uuid Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ruby-uuid

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

sudo aptitude -y install ruby-uuid

How To Uninstall ruby-uuid on Ubuntu 18.04

To uninstall only the ruby-uuid package we can use the following command:

sudo apt-get remove ruby-uuid

Uninstall ruby-uuid And Its Dependencies

To uninstall ruby-uuid and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove ruby-uuid

Remove ruby-uuid Configurations and Data

To remove ruby-uuid configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge ruby-uuid

Remove ruby-uuid configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-uuid

References

Summary

In this tutorial we learn how to install ruby-uuid package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.