How To Install libtemplate-plugin-ipaddr-perl on Ubuntu 18.04

In this tutorial we learn how to install libtemplate-plugin-ipaddr-perl on Ubuntu 18.04. libtemplate-plugin-ipaddr-perl is plugin handling IP addresses for the Template Toolkit

Introduction

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

What is libtemplate-plugin-ipaddr-perl

libtemplate-plugin-ipaddr-perl is:

Template::Plugin::IPAddr implements an IPAddr class for handling IPv4 and IPv6 addresses in an object-orientated way. The module is based on NetAddr::IP and works on IPv4 as well as IPv6 addresses.

You can create a IPAddr object via the USE directive, adding any initial prefix as an argument:

[% USE IPAddr %]

[% USE IPAddr(prefix) %]

Once you’ve got an IPAddr object, you can use it as a prototype to create other IPAddr objects with the new() method.

There are three methods to install libtemplate-plugin-ipaddr-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-ipaddr-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-ipaddr-perl using apt-get by running the following command:

sudo apt-get -y install libtemplate-plugin-ipaddr-perl

Install libtemplate-plugin-ipaddr-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtemplate-plugin-ipaddr-perl

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

sudo aptitude -y install libtemplate-plugin-ipaddr-perl

How To Uninstall libtemplate-plugin-ipaddr-perl on Ubuntu 18.04

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

sudo apt-get remove libtemplate-plugin-ipaddr-perl

Uninstall libtemplate-plugin-ipaddr-perl And Its Dependencies

To uninstall libtemplate-plugin-ipaddr-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-ipaddr-perl

Remove libtemplate-plugin-ipaddr-perl Configurations and Data

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

sudo apt-get -y purge libtemplate-plugin-ipaddr-perl

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

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

sudo apt-get -y autoremove --purge libtemplate-plugin-ipaddr-perl

References

Summary

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