• 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. head Command Examples in Linux
  2. binwalk Command Examples in Linux
  3. strip: command not found
  4. iotop Command Examples in Linux
  5. Linux OS Service ‘kdump’
  6. lynis Command Examples in Linux
  7. partx Command Examples in Linux
  8. dirs: Displays or manipulates the directory stack
  9. 5 Useful Examples of firewall-cmd command
  10. pdbedit: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright