How to uninstall software under Linux

  

Uninstalling Linux platform software is very troublesome, and the prompts are unclear (saying simple people have never seen it before), and often troublesome for path problems, because some source code is compiled and installed, so Paths generally do not use the default path, so software with dependencies can easily go wrong, and no dependent execution or configuration files can be found. Some of them are installed by default, the path is generally scattered, and with more platforms, it is more troublesome to uninstall. Tianyuan himself summed up the common unloading methods. If there is no comprehensiveness, there is no way. It is impossible to manually delete it directly.

Note: The following commands are all performed in the terminal SHELL. X-WINDOW also has a corresponding file management tool, but after all, it is used less. Before installing and uninstalling the software, it is best to look at the README. Generally, there are instructions. The domestic software will not be mentioned. Sometimes the author does not know how to uninstall the software.

One, green software

This kind of software is mostly distributed in the form of compressed package (*.tar.gz,...), similar to the source package below, but does not need to be compiled. , directly extract to a directory to run. This kind of software can be deleted directly to the corresponding directory. Does not involve the modification of the relevant system variables, at most plus the relevant startup options to modify or start the link.

rm -rf softname_version

Second, software installed using RPM package

1, determine software version

rpm -qa| Grep softname*

softname is the software name, and the * wildcard is used for the indeterminate part. Then there will be a list of related packages.

2. Uninstall the package

rpm -e softname_version

softname_version is the full package name.

When uninstalling the RPM installation package, you will often encounter the following error:

  • error: specifies multiple packages, the error usually occurs because there are two or more namesakes Packages (typically x86 and x64 packages are installed), Linux cannot distinguish between uninstall targets. At this time, you can use the --allmatches parameter to tell the uninstaller to uninstall as long as it matches, which is equivalent to uninstalling at the same time.
  • Common uninstall error xxx.so is needed by yyy, indicating that these libraries have dependencies on these programs (running needs), if you confirm that there is no problem, you can use the --nodeps parameter, regardless of the dependencies directly Uninstall gd packages, such as # rpm -e gd --allmatches --nodeps

    3, custom installation and uninstall software

    This kind of software is rare, but some businesses The software will provide, the installation and uninstallation will be the same as the WINDOWS platform, usually only need to run a script to complete.

    Three, self-compiled installation software

    This kind of software has *.tar.gz, *.tar.bz, *.tar.bz2, etc., are source programs, need to compile Installation (of course, there is also the green decompression installation above, but also packaged using tar.gz, not listed here). This type of software does not find any information using the rpm command above. Only God knows (you may not know it after a few days) where it is installed.

    1. Uninstall self-compilation software

    make uninstall

    Note that this command should be executed in the source package directory. Using this command to uninstall the software will be more thorough and relevant. All paths will be listed.

    However, often after we install, the source package will be deleted, only the installation target is left, then the configuration is very troublesome when finding the installation (the path may be the default path, or the path may be specified). And it may not be able to find it. Installing LOG may not be able to help.

    2, XXX uninstall method

    If you encounter the situation mentioned above (in fact, it is often encountered), and can not find the path, you can only manually delete, make sure it is not running The program of interference is fine.

    In addition, there is a source code package in the form of *.src.rpm, which also needs to be compiled and installed. The uninstall method is the same as the second section.

  • Copyright © Windows knowledge All Rights Reserved