How To Install bfs on Ubuntu 20.04

In this tutorial we learn how to install bfs on Ubuntu 20.04. bfs is Breadth-first version of find(1)

Introduction

In this tutorial we learn how to install bfs on Ubuntu 20.04.

What is bfs

bfs is:

bfs is a variant of the UNIX find command that operates breadth-first rather than depth-first.

It tries to be easier to use than find, while remaining compatible with find(1). For example, bfs is less picky about where you put its arguments. bfs also adds some extra options that make some common tasks easier.

When bfs detects that its output is a terminal, it automatically colors its output with the same colors ls uses.

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

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

sudo apt-get update

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

sudo apt-get -y install bfs

Install bfs Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install bfs

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

sudo aptitude -y install bfs

How To Uninstall bfs on Ubuntu 20.04

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

sudo apt-get remove bfs

Uninstall bfs And Its Dependencies

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

sudo apt-get -y autoremove bfs

Remove bfs Configurations and Data

To remove bfs configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge bfs

Remove bfs configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge bfs

References

Summary

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