• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

yum: command not found

by admin

YUM is the default package management system for CentOS/RHEL and part of its role is to automatically calculate what packages may require updating, what dependencies are required, and to manage the entire process of updating your system in a very simple way.

The main configuration file of YUM is /etc/yum.conf, and the main directory, which stores the repository configuration file, is /etc/yum.repos.d/. The repository configuration file has got a specific syntax, and it should end with a .repo extension in the /etc/yum.repos.d/ directory.

The repository configuration file contains the URL of the repository, the repo id, repo name, instructions to use GPG for checking package signatures, and an option to enable or disable the repository.

If you encounter the below error:

yum: command not found

you may try installing the yum package as per your choice of distribution.

Distribution Command
Debian apt-get install yum
Ubuntu apt-get install yum
Kali Linux apt-get install yum
CentOS yum install yum
Fedora dnf install yum
Raspbian apt-get install yum

yum Command Examples

1. To search for a single package, replace the keyword value with the appropriate phrase, string, or parameter, and type the following:

# yum search [keyword]

2. To install a single package, replace the package_name value with the appropriate value and type the following:

# yum install [package_name]

3. There are times when you may wish to install more than one package at a time. To do this, simply invoke the same install command, but instead of naming a single package, simply identify the full list of packages you may require in such a way that it forms a long shopping list.

# yum install [package_name1] [package_name2] [package_name3] ...

4. Install a new package and assume yes to all questions (also works with update, great for automated updates):

# yum -y install package

5. To remove a single package, replace the package_name value with the appropriate value and type the following:

# yum remove [package_name]

6. You can also use the yum command to clean any cached package information. To do this, log in as root and type the following:

# yum clean packages

7. Find the package that provides a particular command:

# yum provides [command]

8. To remove any cached XML-based metadata:

# yum clean metadata

9. To remove any cached database files:

# yum clean dbcache

10. To clean all the files:

# yum clean all

11. To rebuild the YUM cache:

# yum makecache

12. The below command will allow YUM to continue working by bypassing any packages with errors, but this should be regarded as a temporary fix only.

# yum -y update --skip-broken

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to interpret Linux martian source messages
  2. Time goes out of sync on a node running CentOS/RHEL 7
  3. fuser Command Examples in Linux
  4. Image optimization with webp
  5. 7 Useful Find Command Examples to Locate files to remove when a filesystem is full
  6. Extend the size of /boot partition on virtualized environment (CentOS/RHEL 6)
  7. mpstat Command Examples in Linux
  8. how to rotate Tang Server Keys and update the Clevis Client
  9. How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8
  10. Anonymous User Fails to Upload File to VSFTP Server

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright