How to Install/Uninstall traceroute on Linux Server

How to Install traceroute on Linux Server ( CentOS 6, CentOS 7, Redhat 6, Redhat 7)

Log into your Linux Server via SSH and check whether traceroute is already installed on the server.

Command to check whether traceroute is installed on the server : #rpm -qa | grep traceroute
 

root@server [~]# rpm -qa | grep traceroute
root@server [~]#

 
Traceroute is not installed on the above server. You can install traceroute command using yum.

Command to Install traceroute : #yum install traceroute
 

root@server [~]# yum install traceroute

Resolving Dependencies
–> Running transaction check
—> Package traceroute.x86_64 3:2.0.19-5.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
traceroute x86_64 3:2.0.19-5.el7 base 58 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 58 k
Installed size: 91 k
Is this ok [y/d/N]: y
Downloading packages:
traceroute-2.0.19-5.el7.x86_64.rpm | 58 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 3:traceroute-2.0.19-5.el7.x86_64 1/1
Verifying : 3:traceroute-2.0.19-5.el7.x86_64 1/1

Installed:
traceroute.x86_64 3:2.0.19-5.el7

Complete!

 
2. How to uninstall/remove traceroute command from linux server( CentOS 6, CentOS 7, Redhat 6, Redhat 7)

Command to uninstall traceroute package from Linux Server
 

root@server [~]# yum remove traceroute

Resolving Dependencies
–> Running transaction check
—> Package traceroute.x86_64 3:2.0.19-5.el7 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Removing:
traceroute x86_64 3:2.0.19-5.el7 installed 91 k

Transaction Summary
========================================================================================================================================================================
Remove 1 Package

Installed size: 91 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : 3:traceroute-2.0.19-5.el7.x86_64 1/1
Verifying : 3:traceroute-2.0.19-5.el7.x86_64 1/1

Removed:
traceroute.x86_64 3:2.0.19-5.el7

Complete!

 
Traceroute is now removed from the server.