How to query and uninstall installed software in Linux. __linux

Source: Internet
Author: User
Tags bz2 file copy

How to query and uninstall installed software in Linux
The installation and uninstallation of Linux software has been a challenge for many new users. In Windows, we can use the security loading program that comes with the software or Add/Remove Programs in Control Panel. Similar to Linux, there is a powerful software loading and unloading tool called RPM. It can be used to build, install, query, update, uninstall software. The tool is used at the command line. You can get help for this command by entering RPM after the shell's prompt.

Installation of software

There are two different forms of software installation under Linux. The first installation file name is xxx.tar.gz; another installation file name is xxx.i386.rpm. Software distributed in the first way is mostly sent in the form of source code, and the second 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 decompressed. The command is:

#tar Xvzf filename.tar.gz If it is filename.tar.bz2 format, it should be tar jxvf filename.tar.bz2 to extract

3. After executing the command, the installation file is extracted in the current directory by path. Use the LS command to see the uncompressed file. Usually in the resulting file after the decompression, there are "Install" files. This file is a plain text file, detailing how the package is installed.

4. Perform a decompression of the resulting executable script named configure. It is the system information required for installation to check whether the system has the necessary libraries to compile, and whether the version of the library meets the needs of the compilation. Prepare for the subsequent compilation work. Command is: #./configure

If you want to install the software to a specified directory, you should use #./configure--prefix=/your own directory, such as I want to install a mlterm into the/opt/mlterm directory, should be entered as follows

#./configure--prefix=/opt/mlterm

5. After the check is passed, the makefile file for compilation is generated. At this point, you are ready to 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. Installation completed, should clear the compilation process generated during the temporary files and configuration process generated files. Type the following command:

#make Clean

#make Distclean

At this point, the software installation is complete.

For the second, the method of installation is much simpler.

As in the first approach, copy the installation files to your directory. Then use RPM to install the file. The order is as follows:

#rpm-I. filename.i386.rpm

RPM will automatically unpack the installation files and install the software to the default directory. and register the software installation information into the RPM database. The function of the parameter i is to get the RPM into installation mode.

Uninstall of software

1. Software uninstall is mainly done using RPM. The uninstall software first needs to know the name that the package registers in the system. Type the command:

#rpm-Q-A

You can query all the packages that are installed in the current system.

2. Determine the name of the software to uninstall, you can start 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 get the RPM into uninstall mode. Uninstall the package named [Package name]. There is a dependency between each package in the system. If you cannot uninstall because of dependencies, RPM prompts and stops uninstalling. You can use the following commands to ignore dependencies and start uninstalling directly:

#rpm-E [package name]-nodeps

Ignoring the uninstall of dependencies may cause some other software in the system to be unusable

If you want to know where the RPM package is installed.

should use #rpm-QL [package name]

3. How to uninstall the software installed with the source code package.

It is best to look at the readme and install; Generally speaking, but most software does not provide the source code package uninstall method; We can find the installation point of the software removed. It depends on where you installed it.

Like what:

If you are installing the software, specify a directory. This problem is not difficult;

such as 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 software that installs the source package, all specifies installs in the/OPT directory, this does not know;

If deleted, delete the corresponding software directory;

Some software will perform make uninstall in the decompression installation directory, so that you uninstall the

--------------------------------------------------------------------------------

Software Uninstall 1. Software uninstall is mainly done using RPM. The uninstall software first needs to know the name that the package registers in the system. Type command: #rpm-Q-A to query all packages installed in the current system. 2. Determine the name of the software to uninstall, you can start to actually uninstall the software. You can uninstall the software by typing the following command: #rpm-E [package name] parameter E is to allow RPM into uninstall mode. Uninstall the package named [Package name]. There is a dependency between each package in the system. If you cannot uninstall because of dependencies, RPM prompts and stops uninstalling. You can use the following commands to ignore dependencies and start unloading directly: #rpm-E [package name]-nodeps ignoring dependencies can cause other software in the system to be unusable. Add: If the binary software ends with. Bin, you can install it in the following ways (take So-6_0-beta-bin-linux-zh-tw1.bin as an example): in so-6_0- Run analog terminal input in the Beta-bin-linux-zh-tw1.bin folder:./so-6_0-beta-bin-linux-zh-tw1.bin and press ENTER. Of course, you can also enter:./SO again with the [Tab] key complement (./indicates the current directory, if the terminal is not in the software directory open, then the software name to enter the appropriate path. If you are in the graphical interface, you can also click directly (or double-click, depending on the specific mouse settings) to run the anti-Setup program.

Ubuntu Uninstall software (two ways)

You can also use command line search as you search for software in the new.

Install software apt-get install softname1 softname2 softname3 ...

Uninstall software apt-get remove softname1 softname2 softname3 ...

Uninstall and clear the configuration apt-get remove--purge softname1

Update software information Database Apt-get update

Perform system upgrades Apt-get upgrade

Search Packages Apt-cache Search softname1 softname2 softname3 ...

Install the Deb package dpkg-i Xxx.deb

Remove Package Dpkg-r Xxx.deb

Delete the Dpkg-r--purge along with the configuration file Xxx.deb

View package Information Dpkg-info Xxx.deb

View file copy details Dpkg-l xxx.deb

View installed package information in the system dpkg-l

Reconfigure package dpkg-reconfigure XXX

To see the version number of the various packages installed under Ubuntu, there are two ways to do this:

Graphical interface: The new software package Manager
The new Package Manager allows you to view the current version of the installed package and the latest version in the source.
You can see all installed package names, installed versions, latest versions, and so on in the right-hand results list by clicking the Status button in the lower-left corner and then clicking installed in the list above. With the toolbar search, you can quickly search to see if the package you want is installed.

Character Terminal:
It is also easy to view the installed package version number under the terminal, individually to see if the package is installed and version number, and to view upgradeable packages. In order to achieve this goal in the terminal to use a software tool called Apt-show-versions, through the Apt-get installation:
$sudo apt-get Install apt-show-versions
Once installed, you can use commands under the terminal:
$apt-show-versions
to view all installed packages and version numbers, but too much will sweep through, plus the terminal's own script more to print the results of each screen:
$ Apt-show-versions |more
Such a print full screen on the pause, press the ENTER key to print the next line, press the space bar to print the next screen, press the Q key to exit the printing results. If you want to view the version of a single package, use the command:
$apt-show-versions–p <package>   //<package> is a package name, without symbols
If you want to view upgradeable packages, use the command:
$apt-show-versions–u
If there are no packages that can be upgraded, the above command will not return any results.
More parameters to view man, which is easy to use.

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.