How To Install libfile-policy-perl on Debian 10

Learn how to install libfile-policy-perl on Debian 10 with this tutorial. libfile-policy-perl is simple policy for file I/O functions

Introduction

In this tutorial we learn how to install libfile-policy-perl on Debian 10.

What is libfile-policy-perl

libfile-policy-perl is:

File::Policy defines the policy for file I/O with modules such as File::Slurp::WithinPolicy. The purpose is to allow systems administrators to define locations and restrictions for applications’ file I/O and give app developers a policy to follow. Note that the module doesn’t ENFORCE the policy

  • application developers can choose to ignore it (and systems administrators can choose not to install their applications if they do!).

You may control which policy gets applied by creating a File::Policy::Config module with an IMPLEMENTATION constant. You may write your own policy as a module within the File::Policy:: namespace.

By default (if no File::Policy::Config is present), the File::Policy::Default policy gets applied which doesn’t impose any restrictions and provides reasonable default locations for temporary and log files.

The motivation behind this module was a standard, flexible approach to allow a site wide file policy to be defined. This will be most useful in large environments where a few sysadmins are responsible for code written by many other people. Simply ensuring that submitted code calls check_safe() ensures file access is sane, reducing the amount of effort required to do a security audit.

There are three methods to install libfile-policy-perl on Debian 10. 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-policy-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-policy-perl using apt-get by running the following command:

sudo apt-get -y install libfile-policy-perl

Install libfile-policy-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libfile-policy-perl using apt by running the following command:

sudo apt -y install libfile-policy-perl

Install libfile-policy-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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libfile-policy-perl using aptitude by running the following command:

sudo aptitude -y install libfile-policy-perl

How To Uninstall libfile-policy-perl on Debian 10

To uninstall only the libfile-policy-perl package we can use the following command:

sudo apt-get remove libfile-policy-perl

Uninstall libfile-policy-perl And Its Dependencies

To uninstall libfile-policy-perl and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libfile-policy-perl

Remove libfile-policy-perl Configurations and Data

To remove libfile-policy-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libfile-policy-perl

Remove libfile-policy-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libfile-policy-perl

Dependencies

libfile-policy-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libfile-policy-perl package on Debian 10 using different package management tools: apt, apt-get and aptitude.