How To Install libjs-blazy on Ubuntu 22.04

In this tutorial we learn how to install libjs-blazy on Ubuntu 22.04. libjs-blazy is lightweight script for lazy loading and multi-serving images

Introduction

In this tutorial we learn how to install libjs-blazy on Ubuntu 22.04.

What is libjs-blazy

libjs-blazy is:

bLazy is a lightweight script for lazy loading and multi-serving images, iframes, videos and more (less than 1.4KB minified and gzipped). It’s written in pure JavaScript why it doesn’t depend on 3rd-party libraries such as jQuery. It lets you lazy load and multi-serve your images so you can save bandwidth and server requests. The user will have faster load times and save data usage if he/she doesn’t browse the whole page.

There are three methods to install libjs-blazy 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 libjs-blazy Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install libjs-blazy

Install libjs-blazy Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libjs-blazy

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

sudo aptitude -y install libjs-blazy

How To Uninstall libjs-blazy on Ubuntu 22.04

To uninstall only the libjs-blazy package we can use the following command:

sudo apt-get remove libjs-blazy

Uninstall libjs-blazy And Its Dependencies

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

sudo apt-get -y autoremove libjs-blazy

Remove libjs-blazy Configurations and Data

To remove libjs-blazy configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge libjs-blazy

Remove libjs-blazy configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libjs-blazy

References

Summary

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