btrfs-extent-same command not found

In this troubleshooting guide we learn how to fix btrfs-extent-same command not found error message

Introduction

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

btrfs-extent-same: command not found

or when using sudo you get the following error message

sudo: btrfs-extent-same: command not found

Solutions to btrfs-extent-same: command not found

How To Fix btrfs-extent-same: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu btrfs-extent-same is provided by duperemove package.

duperemove is:

Duperemove is a tool for finding duplicated extents and submitting them for deduplication. When given a list of files it will hash their contents on a block by block basis and compare those hashes to each other, finding and categorizing extents that match each other.

On BTRFS and, experimentally, XFS, it can then reflink such extents in a race-free way. Unlike hardlink-based solutions, affected files appear independent in any way other than reduced disk space used.

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

sudo apt-get -y install duperemove

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

You can also use apt command to install duperemove.

sudo apt -y install duperemove

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

sudo aptitude install duperemove

Summary

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