Ways to Uninstall or Install earlyoom on Ubuntu 22.04

Updated: September 5, 2022

Earlyoom is an userspace OOM-killer which can avoid the system to get into unresponsive state caused by swapping, which is most likely to occur when a large swap is present and memory is tight. It checks the amount of available memory and swap periodically, and when both are below a preconfigured value, it kills the largest process. In this guide, I will show you ways to install earlyoom Ubuntu 22.04.

Prerequisites

  • OS: earlyoom needs Ubuntu 22.04 to work
  • Privileges: Verify that you can execute the sudo commands line.

Prerequisites to install earlyoom on Ubuntu 22.04

Install earlyoom Ubuntu 22.04

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

Install earlyoom using APT

This is one of the most popular methods for installing Ubuntu packages since it is simple to understand, even if you are a Linux novice. Following these steps to get earlyoom on your Ubuntu.

Step 1: Update the APT database to download new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install earlyoom Ubuntu by pasting this command into the terminal and executing it.

sudo apt -y install earlyoom

Install earlyoom using Aptitude

Users can manage their installation, upgrade, and removal of packages with Aptitude and view a list of the packages that are currently available. If you haven’t already installed it on Ubuntu, run this command to do so.

sudo apt-get install aptitude

Then, you can now install earlyoom by following these steps:

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing the following Linux command:

sudo apt-get -y update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install earlyoom Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude -y install earlyoom

Uninstall earlyoom 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 earlyoom.

You can uninstall earlyoom on Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove earlyoom

You can also execute this command if you want to uninstall earlyoom and remove its data and dependencies:

sudo apt autoremove --purge earlyoom

Conclusion

In this tutorial, I showed you ways to install earlyoom on Ubuntu 22.04 and ways to uninstall earlyoom too. Please contact me if you require any assistance. I’d be delighted to respond.