cgclear command not found

In this troubleshooting guide we learn how to fix cgclear command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

cgclear: command not found

or when using sudo you get the following error message

sudo: cgclear: command not found

Solutions to cgclear: command not found

How To Fix cgclear: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu cgclear is provided by cgroup-tools package.

cgroup-tools is:

Control Groups (cgroups) provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour.

libcgroup allows one to manipulate, control, administrate and monitor cgroups and the associated controllers.

This package contains the command-line tools.

To fix this problem, we can install more using the command below.

sudo apt-get -y install cgroup-tools

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install cgroup-tools.

sudo apt -y install cgroup-tools

Or if you have aptitude installed you can use the following command.

sudo aptitude install cgroup-tools

Summary

In this tutorial we learn how to fix cgclear command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.