How to Uninstall and Install doas Ubuntu 22.04

Updated: September 5, 2022

OpenDoas: a portable version of OpenBSD’s doas command doas is a minimal replacement for the venerable sudo. It was initially written by Ted Unangst of the OpenBSD project to provide 95% of the features of sudo with a fraction of the codebase. I will show you how to install doas on Ubuntu 22.04 in this guide.

Software Requirement

  • OS: Ubuntu 22.04 or older versions with more than 2GB RAM
  • Privileges: Make sure that you can run the sudo commands line.

Prerequisites to install doas on Ubuntu 22.04

Install doas Ubuntu 22.04

doas 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 you believe is simple and easy to follow.

Install doas using APT

This is a popular method for installing Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these instructions to get doas 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. Launch the terminal and enter the following Linux command:

sudo apt -y update

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

sudo apt-get -y install doas

Install doas 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 install aptitude

After that, you can now install doas, just following these steps:

Step 1: Obtain new packages from Ubuntu by updating the APT database. Launching the terminal and entering the following Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. You can now install doas Ubuntu by executing this command in the terminal.

sudo aptitude install doas

Uninstall doas on Ubuntu 22.04

Have you ever considered how challenging it might be to uninstall an application from Ubuntu? You’re wrong, anyone can easily uninstall any program, not just a doas.

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

sudo apt remove --auto-remove doas

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

sudo apt autoremove --purge doas

Ending

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