How To Install python-libnmap on Debian 10

Learn how to install python-libnmap on Debian 10 with this tutorial. python-libnmap is Python 2 NMAP library

Introduction

In this tutorial we learn how to install python-libnmap on Debian 10.

What is python-libnmap

python-libnmap is:

This package contains a Python library enabling Python developers to manipulate nmap process and data: * automate or schedule nmap scans on a regular basis * manipulate nmap scans results to do reporting * compare and diff nmap scans to generate graphs * batch process scan reports * … The lib currently offers the following modules: * process: enables you to launch nmap scans * parse: enables you to parse nmap reports or scan results (only XML so far) from a file, a string,?? * report: enables you to manipulate a parsed scan result and de/serialize scan results in a json format * diff: enables you to see what changed between two scans * common: contains basic nmap objects like NmapHost and NmapService. It is to note that each object can be ??diff()ed?? with another similar object. * plugins: enables you to support datastores for your scan results directly in the ??NmapReport?? object. from report module: * mongodb: insert/get/getAll/delete * sqlalchemy: insert/get/getAll/delete * aws s3: insert/get/getAll/delete (not supported for Python3 since boto is not supporting py3)

This package installs the library for Python 2.

There are three methods to install python-libnmap 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 python-libnmap Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install python-libnmap

Install python-libnmap Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-libnmap

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

sudo aptitude -y install python-libnmap

How To Uninstall python-libnmap on Debian 10

To uninstall only the python-libnmap package we can use the following command:

sudo apt-get remove python-libnmap

Uninstall python-libnmap And Its Dependencies

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

sudo apt-get -y autoremove python-libnmap

Remove python-libnmap Configurations and Data

To remove python-libnmap configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge python-libnmap

Remove python-libnmap configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python-libnmap

Dependencies

python-libnmap have the following dependencies:

References

Summary

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