• 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 Examples in Linux

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.

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. sudo: command not found
  2. How to uninstall ssh software package from Ubuntu
  3. “az config” Command Examples (Manage Azure CLI configuration)
  4. make Command Examples in Linux
  5. ndctl: command not found
  6. efibootmgr: command not found
  7. dumpe2fs: command not found
  8. CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)
  9. jdeps Command Examples
  10. uptime Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright