How To Install node-yazl on Ubuntu 18.04

In this tutorial we learn how to install node-yazl on Ubuntu 18.04. node-yazl is yet another zip library - Node.js module

Introduction

In this tutorial we learn how to install node-yazl on Ubuntu 18.04.

What is node-yazl

node-yazl is:

yazl is a Node.js module which provides the ability to generate zip files. It uses async APIs to avoid blocking the JavaScript thread, avoids buffering entire files in RAM, and opens input files one at a time to avoid EMFILE errors. yazl supports adding files, buffers, and streams. The output is a stream. If all the files in the zip file are uncompressed, the final size is known before the stream starts.

Node.js is an event-based server-side JavaScript engine.

There are three methods to install node-yazl on Ubuntu 18.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 node-yazl Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install node-yazl

Install node-yazl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install node-yazl

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

sudo aptitude -y install node-yazl

How To Uninstall node-yazl on Ubuntu 18.04

To uninstall only the node-yazl package we can use the following command:

sudo apt-get remove node-yazl

Uninstall node-yazl And Its Dependencies

To uninstall node-yazl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove node-yazl

Remove node-yazl Configurations and Data

To remove node-yazl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge node-yazl

Remove node-yazl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge node-yazl

References

Summary

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