How To Install libtemplate-plugin-json-escape-perl on Ubuntu 18.04

In this tutorial we learn how to install libtemplate-plugin-json-escape-perl on Ubuntu 18.04. libtemplate-plugin-json-escape-perl is module for embedding JSON strings in Template Toolkit

Introduction

In this tutorial we learn how to install libtemplate-plugin-json-escape-perl on Ubuntu 18.04.

What is libtemplate-plugin-json-escape-perl

libtemplate-plugin-json-escape-perl is:

The Template::Plugin::JSON::Escape plugin allows you to embed JSON strings in HTML. In the output, special characters such as < and & are escaped as \uxxxx to prevent XSS attacks.

It also provides decoding function to keep compatibility with Template::Plugin::JSON.

There are three methods to install libtemplate-plugin-json-escape-perl 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 libtemplate-plugin-json-escape-perl Using apt-get

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

sudo apt-get update

After updating apt database, We can install libtemplate-plugin-json-escape-perl using apt-get by running the following command:

sudo apt-get -y install libtemplate-plugin-json-escape-perl

Install libtemplate-plugin-json-escape-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtemplate-plugin-json-escape-perl using apt by running the following command:

sudo apt -y install libtemplate-plugin-json-escape-perl

Install libtemplate-plugin-json-escape-perl 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 libtemplate-plugin-json-escape-perl using aptitude by running the following command:

sudo aptitude -y install libtemplate-plugin-json-escape-perl

How To Uninstall libtemplate-plugin-json-escape-perl on Ubuntu 18.04

To uninstall only the libtemplate-plugin-json-escape-perl package we can use the following command:

sudo apt-get remove libtemplate-plugin-json-escape-perl

Uninstall libtemplate-plugin-json-escape-perl And Its Dependencies

To uninstall libtemplate-plugin-json-escape-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libtemplate-plugin-json-escape-perl

Remove libtemplate-plugin-json-escape-perl Configurations and Data

To remove libtemplate-plugin-json-escape-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libtemplate-plugin-json-escape-perl

Remove libtemplate-plugin-json-escape-perl configuration, data, and all of its dependencies

We can use the following command to remove libtemplate-plugin-json-escape-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtemplate-plugin-json-escape-perl

References

Summary

In this tutorial we learn how to install libtemplate-plugin-json-escape-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.