• 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

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. traceroute Command Examples in Linux
  2. Linux OS Service ‘vncserver’
  3. mate-screenshot: command not found
  4. Cannot Increase “nproc” Value More Than 1024 in CentOS/RHEL 6
  5. How to Use “repoquery” Command to List Package Dependencies
  6. authconfig: command not found
  7. alias: command not found
  8. po4a-gettextize: command not found
  9. CentOS / RHEL 7 : How to recover from deleted root entry in /etc/shadow and/or /etc/passwd files
  10. CentOS / RHEL 5,6 : How to reinstall GRUB loader from rescue mode

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright