How to Install or Uninstall cpulimit Ubuntu 22.04

Updated: September 5, 2022

cpulimit is a simple program that attempts to limit the CPU usage of a process (expressed in percentage, not in CPU time). This is useful to control batch jobs, when you don’t want them to eat too much CPU. It does not act on the nice value or other priority stuff, but on the real CPU usage. Besides it is able to adapt itself to the overall system load, dynamically and quickly. In this tutorial, I will show you ways to install cpulimit Ubuntu 22.04.


  • OS: Ubuntu 22.04 is needed for cpulimit to work
  • Privileges: Check that you can run sudo commands.

Prerequisites to install cpulimit on Ubuntu 22.04

Install cpulimit Ubuntu 22.04

cpulimit 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 cpulimit using APT

This is a popular method for installing any Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these instructions to get cpulimit on your Ubuntu.

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Launch the terminal and enter the following Linux command:

sudo apt -y update

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

sudo apt install cpulimit

Install cpulimit 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 -y install aptitude

After installing aptitude, you can now install cpulimit 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 fetch new packages from Ubuntu. Launch the terminal and enter the following Linux command:

sudo apt-get update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can now install cpulimit Ubuntu by pasting this command into the terminal and pressing Enter.

sudo aptitude -y install cpulimit

Uninstall cpulimit 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 cpulimit from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove cpulimit

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

sudo apt autoremove --purge cpulimit


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