How to query and uninstall installed software in Linux

Source: Internet
Author: User

How to query and uninstall the installation and uninstallation of installed software Linux software has always been a challenge for many new users. In Windows, we can use the software's own loading or unloading program or add/Remove Programs in the Control Panel. Similarly, there is a powerful software-on-load tool called RPM under Linux. It can be used to establish, install, query, update, uninstall software. The tool is used under the command line. You can get help for this command by entering RPM after the shell prompt.
Installation of software
There are two main types of software installation in Linux. The first installation file is named Xxx.tar.gz, and the other installation file is named xxx.i386.rpm. Most of the software issued in the first way is sent in the form of source code, and the second method is sent directly in binary form.
For the first type, the installation method is as follows:
1. First, copy the installation files to your directory. For example, if you are logged on as root, copy the software to/root.
#cp Xxx.tar.gz/root
2. Because the file is compressed and packaged, it should be uncompressed. The command is:
#tar Xvzf filename.tar.gz If it is in filename.tar.bz2 format, it should be tar jxvf filename.tar.bz2 to decompress
3. After the command is executed, the installation files are extracted by path and are decompressed in the current directory. You can see the extracted files with the LS command. Typically, files that are generated after decompression have "Install" files. This file is a plain text file, detailing how the package is installed.
4. An executable script named configure that was generated after the decompression was performed. It is used to check whether the system has a library that is required for compilation, and whether the version of the library meets the required system information for installation such as compilation. Prepare for the subsequent compilation work. The command is: #./configure
If you want to install the software to the specified directory, you should use #./configure--prefix=/your own designated directory, for example, I want to install a mlterm into the/opt/mlterm directory, should be entered as follows
#./configure--prefix=/opt/mlterm
5. After the check passes, a makefile file is generated for compilation. At this point, you can start compiling. The process of compiling depends on the size of the software and the performance of the computer, and the time spent is different. The command is: #make.
6. After successful compilation, type the following command to start the installation:
#make Install
7. After installation, the files generated during the compilation process should be cleared for temporary files and configuration. Type the following command:
#make Clean
#make Distclean
This concludes the installation of the software.
For the second, the installation method is much simpler.
As in the first way, copy the installation files to your directory. Then use RPM to install the file. The command is as follows:
#rpm-I. filename.i386.rpm
RPM will automatically unpack the installation files and install the software into the default directory. and register the installation information of the software in the RPM database. The function of the parameter i is to get the RPM into the installation mode.
Uninstalling the Software
1. The uninstallation of the software is mainly done using RPM. To uninstall the software, first know the name of the package registered in the system. Type the command:
#rpm-Q-A
You can query to all packages installed on the current system.
2. Determine the name of the software to be uninstalled, you can begin to actually uninstall the software. Type the command:
#rpm-E [package name]
You can uninstall the software. The function of the parameter e is to allow the RPM to enter the Unload mode. Uninstall the package named Packages name. Because of the dependencies between the various packages in the system. If there is a dependency that cannot be uninstalled, RPM will give you a hint and stop uninstalling. You can use the following command to ignore dependencies and start unloading directly:
#rpm-E [package name]-nodeps
Ignoring dependencies may cause other software in the system to become unusable
If you want to know where the RPM package is installed?
should use #rpm-QL [package name]
3. How to uninstall software installed with the source code package?
It is best to look at the Readme and install, the general situation has said, but most of the software does not provide the source package unloading method; We can find the installation point of the software to remove. It depends on where you have installed it.
Like what:
If you are installing the software, specify a directory. This problem is not difficult;
For example, using the source package to install Gaim
#./configure--prefix=/opt/gaim
#make
#make Install
If you install Mlterm
#./configure--prefix=/opt/mlterm
#make
#make Install
The source code package installs the software, all specifies installs in the/OPT directory, so does not know;
If deleted, delete the corresponding software catalog;
Some software to perform make uninstall in the decompression installation directory, so that it is uninstalled

How to query and uninstall installed software in Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.