Method of yum command (update software, delete software, etc)

Source: Internet
Author: User
This article mainly introduces common yum commands, including updating software, installing only specified software, querying software information, and deleting software. For more information, see

1. list all software updates
Command: yum check-update

2. install all Update software
Command: yum update

3. only install the specified software
Command: yum install

4. update only the specified software
Command: yum update

5. list all security options? Software List
Command: yum list

Use YUM to install and delete software
It is common to install the system to add and delete software. yum is also competent for this task, as long as the software is installed by rpm.
The installation command is: yum install xxx. yum queries the database to check whether this software package exists. If yes, check its dependency conflict. If no dependency conflict exists, download and install it; if yes, you will receive a prompt asking if you want to install dependencies at the same time or delete conflicting packages. you can make your own judgment.
The delete command is yum remove xxx. like the installation command, yum also queries the database and provides a prompt to solve the dependency.
1. install the software package with YUM
Command: yum install

2. use YUM to delete a software package
Command: yum remove

Use YUM to query software information
We often encounter such a situation. to install a software, we only know that it has something to do with it, but we cannot know its name exactly. In this case, the yum query function takes effect. You can use commands such as yum search keyword to search. for example, if you want to install Instant Messenger, but you don't know what it is, you can use commands such as yum search messenger to search, yum searches for all available rpm descriptions and lists all rpm packages related to messeger in the descriptions. we may obtain gaim, kopete, and so on, and select from them.
Sometimes we install a package without knowing its purpose. we can use the yum info packagename command to obtain information.
1. use YUM to find the software package
Command: yum search

2. list all installable software packages
Command: yum list

3. list all updatable software packages
Command: yum list updates

4. list all installed software packages
Command: yum list installed

5. list all installed but not in Yum Repository? Que na ?? Br/> command: yum list extras

6. list the specified software packages
Command: yum list

7. use YUM to obtain the software package information
Command: yum info

8. list information about all software packages
Command: yum info

9. list information of all updatable software packages
Command: yum info updates

10. list all installed? Software package information
Command: yum info installed

11. list all installed? But not in Yum Repository? Que na ?? Bank? Br/> command: yum info extras

12. list the files provided by the software package
Command: yum provides

Clear YUM cache
Yum stores the downloaded software package and header in the cache, but does not automatically delete it. If we think they occupy disk space, we can use the yum clean command to clear them. more accurately, we use yum clean headers to clear the header and yum clean packages to clear the downloaded rpm package, yum clean all is a brain
1. clear the software packages under the cache Directory (/var/cache/yum)
Command: yum clean packages

2. clear headers under the cache Directory (/var/cache/yum)
Command: yum clean headers

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

4. clear the software packages and old headers in the cache Directory (/var/cache/yum ).
Command: yum clean, yum clean all (= yum clean packages; yum clean oldheaders)

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.