Linux yum installation and cleaning tutorial

Source: Internet
Author: User

Yum (full name Yellow Dog Updater, Modified) is a shell front-end package manager in Fedora. Based on the RPM package management, can automatically download the RPM package from the specified server and install, can automatically handle dependencies, and install all the dependent software package, without tedious downloading, installation.

In our usual CentOS software installation, the Yum command in the search for the installation disk RPM is faster, the collection of some commonly used commands are sorted as follows:

1. List any updatable software
Command: Yum check-update

2. Install any update software
Command: Yum update

3. Install only the specified software
Command: Yum Install * * *

4. Update only the specified software
Command: Yum Update * * *

5. List of any accessible software
Command: Yum list

Installing the removal software with Yum
Install the system to add delete software is common, Yum is also capable of this task, as long as the software is rpm installed.
The command to install is, yum install Xxx,yum will query the database, there is no such software package, if there is, check its dependency conflict, if there is no dependency conflict, then the best, download the installation; If so, you will be prompted to ask if you want to install dependencies at the same time, or delete the conflicting packages. You can make your own judgments.
The delete command is, yum remove xxx, same as the installation, Yum will also query the database, give a solution to the dependencies of the hint.

1. Install packages with Yum
Command: Yum Install * * *

2. Remove packages with Yum
Command: Yum Remove * * * * *

Querying software information with Yum
We often encounter this situation, want to install a software, only know that he and a certain aspect, but not exactly know his name. At this point the Yum query function is working. You can search with commands such as Yum search keyword, for example, we want to install a instant messenger, but do not know exactly what it is, then you may wish to use the Yum search Messenger such instructions for searching, Yum will search for any available RPM descriptions, list any Messeger-related RPM packages, so we might get gaim,kopete and so on and choose from them.
Sometimes we also encounter the installation of a package, but do not know its purpose, we can use Yum Info packagename This instruction to obtain information.

1. Use Yum to find packages
Command: Yum Search * * *

2. List any software packages that can be installed
Command: Yum list

3. List any updatable packages
Command: Yum list updates

4. List any installed packages
Command: Yum List installed

5. List any installed but not Yum Repository nga?? br/> command: Yum list extras

6. List the packages that you specify
Command: Yum list * * *

7. Use Yum to get package information
Command: Yum Info * * * * *

8. List information for any package
Command: Yum Info

9. List any updatable package information
Command: Yum info updates

10. List any package information that has been installed
Command: Yum info installed

11. List any Yum Repository but not in the NGA?? Bank br/> Command: Yum info extras

12. List which documents the package provides
Command: Yum provides

Clear Yum Cache
Yum will store the downloaded packages and headers in the cache and not automatically delete them. If we feel that they are taking up disk space and are able to use the Yum Clean command for cleanup, the more precise use is Yum clean headers clear Header,yum clean packages to clear the downloaded RPM package, yum cleaning all peremptorily end.

1. Clear the package under the cache directory (/var/cache/yum)
Command: Yum Clean packages

2. Clear the Cache directory (/var/cache/yum) under the headers
Command: Yum Clean headers

3. Clear Cache Directory (/var/cache/yum) under the old headers
Command: Yum clean oldheaders

4. Clear the Cache directory (/var/cache/yum) under the package and the old headers
Command: Yum clean, yum clean all (= Yum clean packages; yum clean oldheaders).

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.