How To Install earlyoom on Fedora 34

earlyoom is Early OOM Daemon for Linux

Introduction

In this tutorial we learn how to install earlyoom on Fedora 34.

What is earlyoom

User-space OOM killer daemon that can avoid the system going into the unresponsive state. It checks the amount of available memory and free swap up to 10 times a second (less often if there is a lot of free memory) and kills the largest processes with the highest oom_score. Percentages are configured through the configuration file.

We can use yum or dnf to install earlyoom on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install earlyoom.

Install earlyoom on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install earlyoom using dnf by running the following command:

sudo dnf -y install earlyoom

Install earlyoom on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install earlyoom using yum by running the following command:

sudo yum -y install earlyoom

How To Uninstall earlyoom on Fedora 34

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

sudo dnf remove earlyoom

earlyoom Package Contents on Fedora 34

/etc/default/earlyoom
/usr/bin/earlyoom
/usr/lib/.build-id
/usr/lib/.build-id/ef
/usr/lib/.build-id/ef/9ce034491534d4f21b4dfbe524ddabca55f1b5
/usr/lib/systemd/system/earlyoom.service
/usr/share/doc/earlyoom
/usr/share/doc/earlyoom/README.md
/usr/share/licenses/earlyoom
/usr/share/licenses/earlyoom/LICENSE
/usr/share/man/man1/earlyoom.1.gz

References

Summary

In this tutorial we learn how to install earlyoom on Fedora 34 using yum and dnf.