Common commands and differences between yum and rpm

rpm -qa: Query all installed software packages (often used in conjunction with grep, rpm -qa | grep package name).

rpm -q software package: Query the specified software package.

rpm -ivh software package.rpm: Install the software package (based on compilation and installation, only the rpm installation package will be found locally, which is the fundamental difference from yum).

rpm -Uvh software package.rpm: upgrade software package.

rpm -e software package.rpm: Uninstall the software package (dependencies will be checked. If the current software package has dependencies on other software packages, the uninstallation will fail and the dependencies will be listed).

yum list all: List all software packages in the software repository (including all available and installed packages, often used in conjunction with grep).

yum list installed software package name (if you are not sure about the full name, you can use *): List all installed packages. (It can also be used directly, and all installed software packages will be listed)

yum list available: List all installable packages.

yum list updates: List all updateable packages.

yum info package name: View package information.

yum search: Fuzzy query for the corresponding package based on relevant information. When the package name is not certain, use it for grayscale query.

yum install package name: Install the software package. (To install the latest package and automatically resolve dependency issues, you can add the -y parameter at the end to skip asking)

yum update package name: update the software package (if no package name is specified, all packages will be updated)

yum update-to package name: Update the package to the specified version.

yum remove package name: Uninstall/delete the package (associated deletion will delete other packages that depend on this package and list them)

yum clean all: Clear all packages in the cache.

Guess you like

Origin blog.csdn.net/m0_74060105/article/details/127276177