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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

createrepo: command not found

by Deepika

The createrepo command is a utility in Linux that is used to create a package repository. A package repository is a collection of software packages that are stored in a central location and can be easily accessed and installed by users. Package repositories are commonly used in Linux distributions to provide a centralized location for software packages and to allow users to easily install and update packages on their systems.

To use the createrepo command, you will need to specify the directory that contains the package files that you want to include in the repository. The createrepo command will then process the package files and generate the necessary metadata and index files for the repository.

Here is an example of using the createrepo command:

# createrepo REPO_DIRECTORY

This will create a package repository in the specified directory, using the package files that are located in that directory.

If you encounter the below error while running the command createrepo:

createrepo: command not found

you may try installing the below package as per your choice of distribution:

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

createrepo Command Examples

1. Initialize a basic repository in a directory:

# createrepo path/to/directory

2. Initialize a repository, exclude test RPMs and display verbose logs:

# createrepo -v -x test_*.rpm path/to/directory

3. Initialize a repository, using SHA1 as the checksum algorithm, and ignoring symbolic links:

# createrepo -S -s sha1 path/to/directory

Filed Under: Linux

Some more articles you might also be interested in …

  1. mktemp: command not found
  2. CentOS / RHEL : How to add iptable rules
  3. jpegoptim for image optimization
  4. CentOS/RHEL – How to run a script or command when any user logout the ssh session
  5. modprobe Command Options
  6. “git ls-remote” Command Examples
  7. if Command Examples in Linux
  8. CentOS / RHEL 6 : How to Disable / Enable direct root login via telnet
  9. How to grep with color output
  10. lftp Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • “glab pipeline” Command Examples
  • “glab mr” Command Examples
  • “glab mr merge” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright