Ways to Uninstall and Install debootstrap Ubuntu 22.04

Updated: September 5, 2022

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. In this tutorial, I will show you how to install debootstrap on Ubuntu 22.04.

Prerequisites to install

  • OS: Ubuntu 22.04 is needed for debootstrap to work
  • Privileges: Make sure that you can run the sudo commands line.

Prerequisites to install debootstrap on Ubuntu 22.04

Install debootstrap Ubuntu 22.04

debootstrap is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one that you think is easy and you can follow.

Install debootstrap using APT

This is one of the popular ways to install any Ubuntu packages because it is simple to understand, even if you are a Linux novice. Following these steps to install debootstrap on your Ubuntu 22.04.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt update

Step 2: Start installing the packages on Ubuntu 22.04. You can now install debootstrap Ubuntu by executing this command in the terminal.

sudo apt-get -y install debootstrap

Install debootstrap using Aptitude

With Aptitude, users can view a list of available packages and manage their installation, upgrade, and removal of packages. If you didn’t install it on Ubuntu, you need to install it by executing this command.

sudo apt-get install aptitude

After that, you can now install debootstrap by following these steps:

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt-get update

Step 2: Start the package installation on Ubuntu 22.04. After updating the system, you can install debootstrap Ubuntu by executing this command in the terminal.

sudo aptitude install debootstrap

Uninstall debootstrap on Ubuntu 22.04

Have you ever thought about how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone can easily uninstall any program, not just a package.

This command can be used to uninstall debootstrap from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove debootstrap

To uninstall debootstrap and remove its data and dependencies, you can also use the following command:

sudo apt autoremove --purge debootstrap

Summary

In this guide, I showed you ways to install debootstrap on Ubuntu 22.04 and ways to uninstall debootstrap too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.