How To Install osinfo-db on Ubuntu 18.04

In this tutorial we learn how to install osinfo-db on Ubuntu 18.04. osinfo-db is Operating system database files

Introduction

In this tutorial we learn how to install osinfo-db on Ubuntu 18.04.

What is osinfo-db

osinfo-db is:

libosinfo is a GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support. It provides APIs to match/identify optimal devices for deploying an operating system on a hypervisor.

This package contains the actual database files.

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

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

sudo apt-get update

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

sudo apt-get -y install osinfo-db

Install osinfo-db Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install osinfo-db

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

sudo aptitude -y install osinfo-db

How To Uninstall osinfo-db on Ubuntu 18.04

To uninstall only the osinfo-db package we can use the following command:

sudo apt-get remove osinfo-db

Uninstall osinfo-db And Its Dependencies

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

sudo apt-get -y autoremove osinfo-db

Remove osinfo-db Configurations and Data

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

sudo apt-get -y purge osinfo-db

Remove osinfo-db configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge osinfo-db

References

Summary

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