How to Install or Uninstall traceroute Ubuntu 22.04

Updated: September 23, 2022

The traceroute utility displays the route used by IP packets on their way to a specified network (or Internet) host. Traceroute displays the IP number and host name (if possible) of the machines along the route taken by the packets. Traceroute is used as a network debugging tool. If you’re having network connectivity problems, traceroute will show you where the trouble is coming from along the route. In this tutorial, I will show you how to install traceroute on Ubuntu 22.04.

Requirements to install

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

Prerequisites to install traceroute on Ubuntu 22.04

Install traceroute Ubuntu 22.04

traceroute is one of the popular ways on Ubuntu now so that this tutorial will show you how to install it in various ways. Choose the one you believe is simple and easy to follow.

Install traceroute using APT

This is a popular method for installing Ubuntu packages since it’s simple to understand, even if you’re new to Linux. Following these instructions to install traceroute on your Ubuntu.

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. Launch the terminal and enter the following Linux command:

sudo apt update

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

sudo apt-get -y install traceroute

Install traceroute using Aptitude

Users can manage their installation, upgrade, and removal of packages with Aptitude and view a list of the packages that are currently available. You must run this command to install it if you haven’t already done so on Ubuntu.

sudo apt-get -y install aptitude

After that, you can now install traceroute, just following these steps:

Step 1: The APT package repository cache needs to be updated before you try 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-get update

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

sudo aptitude -y install traceroute

Uninstall traceroute on Ubuntu 22.04

Have you ever thought that uninstalling an application from Ubuntu might be challenging? You’re wrong; any program, not just a traceroute, can be easily uninstalled by anyone.

This command can be used to uninstall traceroute from Ubuntu 22.04 if it was installed using APT or Aptitude.

sudo apt remove --auto-remove traceroute

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

sudo apt autoremove --purge traceroute

Conclusion

In this guide, I showed you ways to install traceroute on Ubuntu 22.04 and some ways to uninstall traceroute too. Please contact me if you require any assistance. I’d be delighted to respond.