How To Install squashfs-tools on Ubuntu 20.04

In this tutorial we learn how to install squashfs-tools on Ubuntu 20.04. squashfs-tools is Tool to create and append to squashfs filesystems

Introduction

In this tutorial we learn how to install squashfs-tools on Ubuntu 20.04.

What is squashfs-tools

squashfs-tools is:

Squashfs is a highly compressed read-only filesystem for Linux. It uses zlib compression to compress both files, inodes and directories. Inodes in the system are very small and all blocks are packed to minimise data overhead. Block sizes greater than 4K are supported up to a maximum of 64K.

Squashfs is intended for general read-only filesystem use, for archival use (i.e. in cases where a .tar.gz file may be used), and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. Task: server, ubuntu-desktop-minimal, ubuntu-desktop, cloud-image, ubuntu-core, kubuntu-desktop, xubuntu-core, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop

There are three methods to install squashfs-tools on Ubuntu 20.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 squashfs-tools Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install squashfs-tools

Install squashfs-tools Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install squashfs-tools

Install squashfs-tools 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 squashfs-tools using aptitude by running the following command:

sudo aptitude -y install squashfs-tools

How To Uninstall squashfs-tools on Ubuntu 20.04

To uninstall only the squashfs-tools package we can use the following command:

sudo apt-get remove squashfs-tools

Uninstall squashfs-tools And Its Dependencies

To uninstall squashfs-tools and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove squashfs-tools

Remove squashfs-tools Configurations and Data

To remove squashfs-tools configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge squashfs-tools

Remove squashfs-tools configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge squashfs-tools

References

Summary

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