How To Install debootstrap on Ubuntu 20.04

In this tutorial we learn how to install debootstrap on Ubuntu 20.04. debootstrap is Bootstrap a basic Debian system Bootstrap a basic Debian system

Introduction

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

What is debootstrap

debootstrap is:

debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be chrooted into.

Package: debootstrap Architecture: all Version: 1.0.118ubuntu1 Priority: extra Section: admin Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Install System Team [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 291 Depends: wget Recommends: gnupg, ubuntu-keyring Suggests: arch-test (>= 0.11~), squid-deb-proxy-client Filename: pool/main/d/debootstrap/debootstrap_1.0.118ubuntu1_all.deb Size: 39282 MD5sum: 08aa30aa009bb70f65a05a0ea5b914cd SHA1: 0dc457858ecdc3b491242c1bf699c7eceb789e16 SHA256: f9f61845b70f80f3b1aa5a18f2d84c83c142dff22a2075db5c98b30f2bc9a3d9 Description-en: Bootstrap a basic Debian system debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be chrooted into.

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

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

sudo apt-get update

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

sudo apt-get -y install debootstrap

Install debootstrap Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install debootstrap

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

sudo aptitude -y install debootstrap

How To Uninstall debootstrap on Ubuntu 20.04

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

sudo apt-get remove debootstrap

Uninstall debootstrap And Its Dependencies

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

sudo apt-get -y autoremove debootstrap

Remove debootstrap Configurations and Data

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

sudo apt-get -y purge debootstrap

Remove debootstrap configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge debootstrap

References

Summary

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