How to Uninstall or Install iproute2 on Ubuntu 22.04

Updated: September 4, 2022

The iproute2 suite is a collection of utilities for networking and traffic control. In this tutorial, I will show you ways to install iproute2 Ubuntu 22.04.

Prerequisites

  • OS: Ubuntu 22.04 or older Ubuntu versions
  • Privileges: Ascertain that you are able to execute sudo commands.

Prerequisites to install iproute2 on Ubuntu 22.04

Install iproute2 Ubuntu 22.04

iproute2 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 iproute2 using APT

This is a popular method for installing any Ubuntu packages because it is simple to understand, even if you are a Linux beginner. Following these instructions to install iproute2 on your Ubuntu 22.04.

Step 1: You must update the APT package repository cache before attempting to install, update, or remove any packages. Update the APT database to download new packages from Ubuntu. Launching the terminal and entering the following Linux command:

sudo apt-get -y update

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

sudo apt -y install iproute2

Install iproute2 using Aptitude

Aptitude allows users to view a list of available packages and manage package installation, upgrade, and removal. If you haven’t already installed it on Ubuntu, run this command to do so.

sudo apt-get -y install aptitude

Then, you can now install iproute2 by following these steps:

Step 1: Obtain new packages from Ubuntu by updating the APT database. Launch the terminal and enter the following Linux command:

sudo apt update

Step 2: Install the package on Ubuntu 22.04. After updating, you can install iproute2 Ubuntu by pasting this command into the terminal and executing it.

sudo aptitude install iproute2

Uninstall iproute2 on Ubuntu 22.04

Have you ever considered how challenging it might be to uninstall an application from Ubuntu? You’re wrong, anyone can easily uninstall any program, not just a iproute2.

You can uninstall iproute2 on Ubuntu by running this command if you installed it using APT or Aptitude.

sudo apt remove --auto-remove iproute2

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

sudo apt autoremove --purge iproute2

Summary

In this tutorial, I showed you ways to install iproute2 on Ubuntu 22.04 and ways to uninstall iproute2 too. Please do not hesitate to contact me if you require any assistance. I’m delighted to respond to them.