How To Install scrub on Ubuntu 18.04

In this tutorial we learn how to install scrub on Ubuntu 18.04. scrub is writes patterns on magnetic media to thwart data recovery

Introduction

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

What is scrub

scrub is:

scrub iteratively writes patterns on files or disk devices to make retrieving the data more difficult.

scrub can write patterns direct to disk, destroying any file system (preferred method), or it can write patterns on files, or on file system free space.

scrub writes NNSA NAP-14.x, DoD 5220.22-M, BSI, 35-pass gutmann, or one of several other selectable pattern sequences.

scrub operates at the POSIX system call level, thus it is portable to a wide variety of hardware platforms. However, this means it cannot do certain things like manipulate spare blocks on disks, etc..

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

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

sudo apt-get update

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

sudo apt-get -y install scrub

Install scrub Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install scrub

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

sudo aptitude -y install scrub

How To Uninstall scrub on Ubuntu 18.04

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

sudo apt-get remove scrub

Uninstall scrub And Its Dependencies

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

sudo apt-get -y autoremove scrub

Remove scrub Configurations and Data

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

sudo apt-get -y purge scrub

Remove scrub configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge scrub

References

Summary

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