How To Install xz on Fedora 34

xz is LZMA compression utilities

Introduction

In this tutorial we learn how to install xz on Fedora 34.

What is xz

XZ Utils are an attempt to make LZMA compression easy to use on free (as in freedom) operating systems. This is achieved by providing tools and libraries which are similar to use than the equivalents of the most popular existing compression algorithms. LZMA is a general purpose compression algorithm designed by Igor Pavlov as part of 7-Zip. It provides high compression ratio while keeping the decompression speed fast.

We can use yum or dnf to install xz on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install xz.

Install xz on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install xz using dnf by running the following command:

sudo dnf -y install xz

Install xz on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install xz using yum by running the following command:

sudo yum -y install xz

How To Uninstall xz on Fedora 34

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

sudo dnf remove xz

xz Package Contents on Fedora 34

/etc/profile.d/colorxzgrep.csh
/etc/profile.d/colorxzgrep.sh
/usr/bin/unxz
/usr/bin/xz
/usr/bin/xzcat
/usr/bin/xzcmp
/usr/bin/xzdec
/usr/bin/xzdiff
/usr/bin/xzegrep
/usr/bin/xzfgrep
/usr/bin/xzgrep
/usr/bin/xzless
/usr/bin/xzmore
/usr/lib/.build-id
/usr/lib/.build-id/18
/usr/lib/.build-id/18/668a4d77bee2064f2b8104422a53bedc3a4012
/usr/lib/.build-id/91
/usr/lib/.build-id/91/12d14fd51219fb09d4f68f61fd70dca87ae6b4
/usr/share/doc/xz
/usr/share/doc/xz/AUTHORS
/usr/share/doc/xz/COPYING
/usr/share/doc/xz/COPYING.GPLv2
/usr/share/doc/xz/NEWS
/usr/share/doc/xz/README
/usr/share/doc/xz/THANKS
/usr/share/doc/xz/TODO
/usr/share/doc/xz/faq.txt
/usr/share/doc/xz/history.txt
/usr/share/doc/xz/lzma-file-format.txt
/usr/share/doc/xz/xz-file-format.txt
/usr/share/licenses/xz
/usr/share/licenses/xz/COPYING
/usr/share/licenses/xz/COPYING.GPLv2
/usr/share/licenses/xz/COPYING.GPLv3
/usr/share/licenses/xz/COPYING.LGPLv2.1
/usr/share/locale/cs/LC_MESSAGES/xz.mo
/usr/share/locale/da/LC_MESSAGES/xz.mo
/usr/share/locale/de/LC_MESSAGES/xz.mo
/usr/share/locale/fi/LC_MESSAGES/xz.mo
/usr/share/locale/fr/LC_MESSAGES/xz.mo
/usr/share/locale/hu/LC_MESSAGES/xz.mo
/usr/share/locale/it/LC_MESSAGES/xz.mo
/usr/share/locale/pl/LC_MESSAGES/xz.mo
/usr/share/locale/pt_BR/LC_MESSAGES/xz.mo
/usr/share/locale/vi/LC_MESSAGES/xz.mo
/usr/share/locale/zh_CN/LC_MESSAGES/xz.mo
/usr/share/locale/zh_TW/LC_MESSAGES/xz.mo
/usr/share/man/de/man1/unxz.1.gz
/usr/share/man/de/man1/xz.1.gz
/usr/share/man/de/man1/xzcat.1.gz
/usr/share/man/de/man1/xzcmp.1.gz
/usr/share/man/de/man1/xzdec.1.gz
/usr/share/man/de/man1/xzdiff.1.gz
/usr/share/man/de/man1/xzegrep.1.gz
/usr/share/man/de/man1/xzfgrep.1.gz
/usr/share/man/de/man1/xzgrep.1.gz
/usr/share/man/de/man1/xzless.1.gz
/usr/share/man/de/man1/xzmore.1.gz
/usr/share/man/man1/unxz.1.gz
/usr/share/man/man1/xz.1.gz
/usr/share/man/man1/xzcat.1.gz
/usr/share/man/man1/xzcmp.1.gz
/usr/share/man/man1/xzdec.1.gz
/usr/share/man/man1/xzdiff.1.gz
/usr/share/man/man1/xzegrep.1.gz
/usr/share/man/man1/xzfgrep.1.gz
/usr/share/man/man1/xzgrep.1.gz
/usr/share/man/man1/xzless.1.gz
/usr/share/man/man1/xzmore.1.gz

References

Summary

In this tutorial we learn how to install xz on Fedora 34 using yum and dnf.