How to uninstall software in Linux

7,975

Solution 1

rpm -e <package> or yum remove <package> if it was installed via a package. Otherwise make uninstall or judicious use of rm.

Solution 2

If I want to uninstall a program quickly and I only know part of the name I find the following commands always nice.

Lets say I want to remove only tomcat from my system, I use:

rpm -qa | grep "tomcat" | xargs rpm -e

If I want to remove tomcat and all its dependencies I use:

rpm -qa | grep "tomcat" | xargs yum erase -y

There are all kinds of variations on these commands, and they can be quite powerful.

Share:
7,975

Related videos on Youtube

David Yates
Author by

David Yates

I'm a hobbyist programmer, part-time sysadmin, and full-time analytics, big data, data center management, automation, and cloud computing architect and delivery engineer.

Updated on September 17, 2022

Comments

  • David Yates
    David Yates almost 2 years

    how to uninstall software in linux. I am facing issues installing No machine setup(NX)

  • vonbrand
    vonbrand over 11 years
    Better do "yum erase /usr/bin/tomcat" in such a case.