How to Uninstall or Install masscan on Ubuntu 22.04

Updated: September 20, 2022

MASSCAN is TCP port scanner which transmits SYN packets asynchronously and produces results similar to nmap, the most famous port scanner. Internally, it operates more like scanrand, unicornscan, and ZMap, using asynchronous transmission. It’s a flexible utility that allows arbitrary address and port ranges. In this guide, I will show you ways to install masscan Ubuntu 22.04.

Prerequisites

  • Operating system: masscan needs Ubuntu 22.04 to work
  • Privileges: Make sure you are able to execute sudo commands.

Prerequisites to install masscan on Ubuntu 22.04

Install masscan Ubuntu 22.04

masscan is one of the popular ways on Ubuntu now so that this tutorial will show you some ways to install it. Choose the one that you think is easy and you can follow.

Install masscan using APT

This is one of the most popular methods for installing Ubuntu packages because it’s easy to follow, even if you are a newbie in Linux. Following these steps to install masscan on your Ubuntu 22.04.

Step 1: The APT package repository cache needs to be updated before you try to install, update, or remove any packages. Obtain new packages from Ubuntu by updating the APT database. Opening the terminal and executing the following Linux command:

sudo apt -y update

Step 2: Install the package on Ubuntu 22.04. After updating the system, you can install masscan Ubuntu by executing this command in the terminal.

sudo apt-get install masscan

Install masscan using Aptitude

If you haven’t already installed Aptitude on Ubuntu, run this command to do so.

sudo apt-get install aptitude

After installing it, you can now install masscan by following these steps:

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to fetch new packages from Ubuntu. Opening the terminal and executing this Linux command:

sudo apt -y update

Step 2: Start installing the packages on Ubuntu 22.04. You can now install masscan Ubuntu by executing this command in the terminal.

sudo aptitude install masscan

Uninstall masscan on Ubuntu 22.04

Have you ever considered how difficult it is to uninstall an application from Ubuntu? You are mistaken; anyone, not just package administrators, can easily uninstall any program.

If you installed masscan using APT or Aptitude, you could uninstall masscan on Ubuntu by running this command

sudo apt remove --auto-remove masscan

If you want to uninstall masscan and remove its data and dependencies, you can also run the following command:

sudo apt autoremove --purge masscan

Conclusion

In this tutorial, I showed you ways to install masscan on Ubuntu 22.04 and ways to uninstall masscan too. If you need any help, don’t hesitate to contact me. I’m very glad to answer them.