CGCLEAR(1)
β¨ cgclear β¨
okay so welcome to the libcgroup Manual, bestie π this one's about cgclear, and it's literally the "nuke it, we're done here" button for your cgroup filesystem. buckle up π
π¦ NAME π¦
cgclear β unload the cgroup filesystem
πΈ SYNOPSIS πΈ
cgclear [-e] [-l <filename>] [-L <directory>] [...]
π DESCRIPTION π
So here's the tea β β if you run this with no parameters at all, it goes full main character and does three things in a row:
- moves all the tasks sitting inside the various cgroups back into the root cgroup π«Ά
- deletes all the cgroups, every last one, no survivors π
- and finally unmounts the cgroup filesystem from your system entirely
periodt. that's the whole vibe.
Now β if you do hand it one or more config files, it switches to a much more chill mode: only the groups that are actually defined in those config files get removed. β¨
And here's the lil detail that matters: those files are processed in reverse order. Like, the last file on the command line gets processed first. which means cgclear can take the exact same command line arguments as whatever the appropriate cgconfigparser would take. iykyk π
-l,--load=<filename>β tells it which config file to read. you can use this option multiple times, and you can totally mix it up with the-Loption π-L,--load-directory=<directory>β points at a directory that it should search for configuration files in. every file in that directory gets processed in alphabetical order, exactly as if they'd been specified by-lone by one. also usable multiple times, also mixable with-lπ-eβ this one says only remove empty groups, bestie. so if a group defined in a config file has tasks inside it, or has a subgroup, it will not be removed. and heads up: this option only does anything when you're using-lor-L. on its own it's giving nothing π
π ENVIRONMENT VARIABLES π
CGROUP_LOGLEVELβ controls how chatty the tool is. the allowed values areDEBUG,INFO,WARNINGorERROR. pick your volume ποΈ
π FILES π
/etc/cgconfig.confβ the default templates file/etc/cgconfig.d/β the default templates files directory
β EXAMPLES β
cgclear
unload the whole entire cgroup filesystem. all of it. gone. slay π
cgclear -l /etc/cgconfig.conf
unload a subsystem of the cgroup filesystem based on what /etc/cgconfig.conf defines π¦
π SEE ALSO π
cgconfigparser(1), cgconfig.conf(5)
fr fr go read those if you want the full picture, this page is just one part of the story bestie π«Ά
and that's the whole page!! π this came to you from the libcgroup Manual, running on Linux, dated 2009-10-23, and it lives under the name CGCLEAR(1) β mwah, take care of yourself, drink water, and don't cgclear a production box without thinking first ππ
π¦ where this page comes from
- debian bookworm: cgroup-tools 2.0.2-2 Β· LGPL-2.1-only
- ubuntu jammy: cgroup-tools 2.0-2 Β· LGPL-2.1-only
- ubuntu noble: cgroup-tools 2.0.2-2build1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms