How to Install/Remove tcpdump on Linux Server

How to Install tcpdump on CentOS 6, CentOS 7, RHEL Linux Server

Login to your linux Server via ssh as root and first check whether tcpdump is installed on your server.

Command to check whether tcpdump is installed on your Linux Server : #rpm -qa | grep tcpdump

Command to Install tcpdump package on Linux Server : #yum install tcpdump
 

root@server [/]# yum install tcpdump

Resolving Dependencies
–> Running transaction check
—> Package tcpdump.x86_64 14:4.5.1-3.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
tcpdump x86_64 14:4.5.1-3.el7 base 387 k

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

Total download size: 387 k
Installed size: 931 k
Is this ok [y/d/N]: y
Downloading packages:
tcpdump-4.5.1-3.el7.x86_64.rpm | 387 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 14:tcpdump-4.5.1-3.el7.x86_64 1/1
Verifying : 14:tcpdump-4.5.1-3.el7.x86_64 1/1

Installed:
tcpdump.x86_64 14:4.5.1-3.el7

Complete!

 
Tcpdump package is now Installed on your Linux Server.

How to Remove/Uninstall tcpdump package on CentOS 6 & 7, RedHat 6 & 7

Just type “yum remove tcpdump” to uninstall/remove tcpdump package from your linux server.
 

root@server [/usr/bin]# yum remove tcpdump

Resolving Dependencies
–> Running transaction check
—> Package tcpdump.x86_64 14:4.5.1-3.el7 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Removing:
tcpdump x86_64 14:4.5.1-3.el7 @base 931 k

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

Installed size: 931 k
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : 14:tcpdump-4.5.1-3.el7.x86_64 1/1
Verifying : 14:tcpdump-4.5.1-3.el7.x86_64 1/1

Removed:
tcpdump.x86_64 14:4.5.1-3.el7

Complete!