Common parameters of yum commands in CentOS

Source: Internet
Author: User
Tags install perl
Yum is a background program used to manage rpm packages. it is written in python and can easily solve rpm dependencies. After the yum server is created, the yum client can obtain the software package through http and ftp, and directly manage and update all the rpm packages, even including kernel updates, using convenient commands. It can also be understood as an apt management tool in the Hongqi environment. 1. list package files list all the rpm packages that can be installed or updated in the resource library # List specific

Yum is a background program used to manage rpm packages. it is written in python and can easily solve rpm dependencies. After the yum server is created, the yum client can obtain the software package through http and ftp, and directly manage and update all the rpm packages, even including kernel updates, using convenient commands. It can also be understood as an apt management tool in the Hongqi environment.

I. list package files
List all rpm packages that can be installed or updated in the Resource Library

# Yum list
List specific rpm packages that can be installed, updated, and installed in the Resource Library

# Yum list perl // list the packages named perl
# Yum list perl * // list packages starting with perl
List all updates to the rpm package in the Resource Library

# Yum list updates
List all installed rpm packages

# Yum list installed
List rpm packages installed but not included in the Resource Library

# Yum list extras
Note: extras is the name of the resource list defined in repos. d.

II. list resource information
Lists information about all rpm packages that can be installed or updated in the resource library.

# Yum info
Lists the specific information of rpm packages that can be installed or updated and installed in the resource library.

# Yum info perl // list perl package information
# Yum info perl * // list information of all packages starting with perl
Lists information about all the rpm packages that can be updated in the resource library.

# Yum info updates
Lists information about all installed rpm packages.

# Yum info installed
Lists the installed rpm packages that are not included in the resource library.

# Yum info extras
III. search
Search for rpm packages matching specific characters

# Yum search perl // search for the package name and package description
Search for rpm packages with specific file names

# Yum provides realplay
IV. management package
Install the rpm Package

# Yum install perl // install the perl package
# Yum install perl * // install a package starting with perl
Delete an rpm package, including packages that depend on the package

# Yum remove perl * // All perl-* packages are deleted.
5. Update
Check the updatable rpm Package

# Yum check-update
Update all rpm packages

# Yum update
Update the specified rpm package, such as updating the kernel and kernel source

# Yum update kernel-source
For large-scale version upgrades, unlike yum update, the old obsolete package is also upgraded.

# Yum upgrade
6. clear cache
Clear temporary rpm Package files

# Yum clean packages
Clear temporary rpm header files

# Yum clearn headers
Clear the existing rpm header file

# Yum clean oldheaders
Clear existing rpm header files and package files

# Yum clearn
Or
# Yum clearn all
VII. others
Install Livna.org rpms GPG key

# Rpm -- import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
Check GPG Key

# Rpm-qa gpg-pubkey *
Show Key Information

# Rpm-qi gpg-pubkey-a109b1ec-3f6e28d5
Delete Key

# Rpm e gpg-pubkey-a109b1ec-3f6e28d5


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.