How To Install libfile-pushd-perl on Ubuntu 20.04
Introduction
In this tutorial we learn how to install libfile-pushd-perl
on Ubuntu 20.04.
What is libfile-pushd-perl
libfile-pushd-perl is:
File::pushd does a temporary chdir that is easily and automatically reverted, similar to pushd in some Unix command shells. It works by creating an object that caches the original working directory. When the object is destroyed, the destructor calls chdir to revert to the original working directory. By storing the object in a lexical variable with a limited scope, this happens automatically at the end of the scope.
This is very handy when working with temporary directories for tasks like testing; a function is provided to streamline getting a temporary directory from File::Temp.
There are three methods to install libfile-pushd-perl
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 libfile-pushd-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 libfile-pushd-perl
using apt-get
by running the following command:
sudo apt-get -y install libfile-pushd-perl
Install libfile-pushd-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libfile-pushd-perl
using apt
by running the following command:
sudo apt -y install libfile-pushd-perl
Install libfile-pushd-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 libfile-pushd-perl
using aptitude
by running the following command:
sudo aptitude -y install libfile-pushd-perl
How To Uninstall libfile-pushd-perl on Ubuntu 20.04
To uninstall only the libfile-pushd-perl
package we can use the following command:
sudo apt-get remove libfile-pushd-perl
Uninstall libfile-pushd-perl And Its Dependencies
To uninstall libfile-pushd-perl
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove libfile-pushd-perl
Remove libfile-pushd-perl Configurations and Data
To remove libfile-pushd-perl
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge libfile-pushd-perl
Remove libfile-pushd-perl configuration, data, and all of its dependencies
We can use the following command to remove libfile-pushd-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libfile-pushd-perl
References
Summary
In this tutorial we learn how to install libfile-pushd-perl
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.