How To Install sgb on Ubuntu 18.04

In this tutorial we learn how to install sgb on Ubuntu 18.04. sgb is The Stanford GraphBase

Introduction

In this tutorial we learn how to install sgb on Ubuntu 18.04.

What is sgb

sgb is:

A highly portable collection of programs and data for researchers who study combinatorial algorithms and data structures.

The programs are intended to be interesting in themselves as examples of literate programming. Thus, the Stanford GraphBase can also be regarded as a collection of approximately 30 essays for programmers to enjoy reading, whether or not they are doing algorithmic research. The programs are written in CWEB, a combination of TeX and C that is easy to use by anyone who knows those languages and easy to read by anyone familiar with the rudiments of C.

This package contains only the libraries and the demonstration programs; for the readable source code, which forms the documentation as well, see the sgb-doc package.

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

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

sudo apt-get update

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

sudo apt-get -y install sgb

Install sgb Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install sgb using apt by running the following command:

sudo apt -y install sgb

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

sudo aptitude -y install sgb

How To Uninstall sgb on Ubuntu 18.04

To uninstall only the sgb package we can use the following command:

sudo apt-get remove sgb

Uninstall sgb And Its Dependencies

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

sudo apt-get -y autoremove sgb

Remove sgb Configurations and Data

To remove sgb configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge sgb

Remove sgb configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge sgb

References

Summary

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