How To Install ruby-awesome-print on Ubuntu 20.04

In this tutorial we learn how to install ruby-awesome-print on Ubuntu 20.04. ruby-awesome-print is pretty print Ruby objects with proper indentation and colors

Introduction

In this tutorial we learn how to install ruby-awesome-print on Ubuntu 20.04.

What is ruby-awesome-print

ruby-awesome-print is:

Great Ruby dubugging companion: pretty print Ruby objects to visualize their structure. It supports custom object formatting via plugins. Ruby-Versions: all

There are three methods to install ruby-awesome-print on Ubuntu 20.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-awesome-print 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-awesome-print using apt-get by running the following command:

sudo apt-get -y install ruby-awesome-print

Install ruby-awesome-print Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ruby-awesome-print

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

sudo aptitude -y install ruby-awesome-print

How To Uninstall ruby-awesome-print on Ubuntu 20.04

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

sudo apt-get remove ruby-awesome-print

Uninstall ruby-awesome-print And Its Dependencies

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

sudo apt-get -y autoremove ruby-awesome-print

Remove ruby-awesome-print Configurations and Data

To remove ruby-awesome-print configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge ruby-awesome-print

Remove ruby-awesome-print configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-awesome-print

References

Summary

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