pristine-gz command not found

In this troubleshooting guide we learn how to fix pristine-gz command not found error message

Introduction

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

pristine-gz: command not found

or when using sudo you get the following error message

sudo: pristine-gz: command not found

Solutions to pristine-gz: command not found

How To Fix pristine-gz: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pristine-gz is provided by pristine-tar package.

pristine-tar is:

pristine-tar can regenerate a pristine upstream tarball using only a small binary delta file and a revision control checkout of the upstream branch.

The package also includes a pristine-gz command, which can regenerate a pristine .gz file, a pristine-bz2 for .bz2 files, and a pristine-xz for .xz files.

The delta file is designed to be checked into revision control along-side the upstream branch, thus allowing Debian packages to be built entirely using sources in revision control, without the need to keep copies of upstream tarballs.

An optional upstream signature may be attached to tarballs for verification by, for example, dpkg-source(1).

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

sudo apt-get -y install pristine-tar

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

You can also use apt command to install pristine-tar.

sudo apt -y install pristine-tar

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

sudo aptitude install pristine-tar

Summary

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