compsize command not found

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

Introduction

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

compsize: command not found

or when using sudo you get the following error message

sudo: compsize: command not found

Solutions to compsize: command not found

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

In Ubuntu compsize is provided by btrfs-compsize package.

btrfs-compsize is:

Compsize takes a list of files on a btrfs filesystem (recursing directories) and measures used compression types and the effective compression ratio.

Because of partially used extents on one hand, and multiple reflinks to an extent on the other, the definition of used space can be quite unintuitive. This program provides answers at different stages:

  • blocks on the disk
  • uncompressed extents
  • apparent file sizes (sans holes)

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

sudo apt-get -y install btrfs-compsize

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

You can also use apt command to install btrfs-compsize.

sudo apt -y install btrfs-compsize

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

sudo aptitude install btrfs-compsize

Summary

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