How To Install pax on Ubuntu 22.04

In this tutorial we learn how to install pax on Ubuntu 22.04. pax is Portable Archive Interchange (cpio, pax, tar)

Introduction

In this tutorial we learn how to install pax on Ubuntu 22.04.

What is pax

pax is:

paxtar is an implementation of an archiving utility that reads and writes several formats - traditional ones, the extended formats specified in IEEE 1003.1, and the ar(5) format used by deb(5) packages (MirBSD specific paxtar extension). The pax interface was designed by IEEE 1003.2 as a compromise in the chronic controversy over which of tar or cpio is best, but this implementation offers paxcpio and paxtar for easy calling.

This is the MirBSD paxtar implementation supporting the formats ar, bcpio, cpio, SVR4 cpio with and without CRC, old tar, and ustar, but not the format known as pax yet. It has extensions for removing non-numerical user and group IDs from the archive, storing hardlinked files only once, setting ownership to the superuser, anonymising inode and device information, changing the mtime to zero, and producing GNU tar compatible trailing slashes on ustar directory nodes. Its “ar” format is suitable for operating on *.deb files, unlike that of GNU binutils.

Note that ACLs and Extended Attributes are not supported.

There are three methods to install pax on Ubuntu 22.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install pax Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install pax using apt-get by running the following command:

sudo apt-get -y install pax

Install pax Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install pax using apt by running the following command:

sudo apt -y install pax

Install pax Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install pax using aptitude by running the following command:

sudo aptitude -y install pax

How To Uninstall pax on Ubuntu 22.04

To uninstall only the pax package we can use the following command:

sudo apt-get remove pax

Uninstall pax And Its Dependencies

To uninstall pax and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove pax

Remove pax Configurations and Data

To remove pax configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge pax

Remove pax configuration, data, and all of its dependencies

We can use the following command to remove pax configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge pax

References

Summary

In this tutorial we learn how to install pax package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.