Search

Chapter 2. Managing repositories

download PDF

2.1. Available channels

Certified Cloud and Service Provider (CCSP) partners control what channels and packages are delivered through their service. See Red Hat Enterprise Linux repositories that can be delivered through Red Hat’s Certified Cloud and Service Provider (CCSP) partners via RHUI for the most current information regarding what channels are available for the various operating system versions.

The repositories available for use with RHEL 8 are as follows:

  • Red Hat Enterprise Linux 8 for x86_64 - AppStream from RHUI (RPMs)
  • Red Hat Enterprise Linux 8 for x86_64 - BaseOS from RHUI (RPMs)
  • Red Hat Enterprise Linux 8 for x86_64 - High Availability (RPMs) from RHUI
  • Red Hat Enterprise Linux 8 for x86_64 - Resilient Storage (RPMs) from RHUI
  • Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs) from RHUI
  • Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs) from RHUI

Contact your CCSP if a required channel is missing.

Additional resources

2.2. Listing repositories currently managed by RHUI 4

A repository is a server node that contains downloadable software for a Linux distribution. You use yum to search for, install, and control RPMs from the repository to your RHUA and CDS nodes.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press l to select list repositories currently managed by the RHUI:

    ...
    
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.0)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.1)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.2)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.3)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.0)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.1)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.2)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.3)
    Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3)
    Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4)
    
    ...

2.3. Displaying detailed information on a repository

You can use the Repository Management screen to display information about a particular repository.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press i:

    Enter value (1-1631) to toggle selection, 'c' to confirm selections, or '?' for more commands:
  4. Select the repository by entering the value beside the repository name. Enter one repository selection at a time before confirming your product selection.
  5. Press c to confirm:

    Name:                Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Debug RPMs) from RHUI (8.4)
    ID:                  rhel-8-for-aarch64-appstream-debug-rhui-rpms-8.4
    Type:                Red Hat
    Version:             0
    Relative Path:       content/dist/rhel8/rhui/8.4/aarch64/appstream/debug
    GPG Check:           Yes
    Custom GPG Keys:     (None)
    Red Hat GPG Key:     Yes
    Content Unit Count:
    Last Sync:           2021-11-15 15:56:06
    Next Sync:           2021-11-15 22:00:00
    
    Name:                Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4)
    ID:                  rhel-8-for-aarch64-appstream-rhui-rpms-8.4
    Type:                Red Hat
    Version:             0
    Relative Path:       content/dist/rhel8/rhui/8.4/aarch64/appstream/os
    GPG Check:           Yes
    Custom GPG Keys:     (None)
    Red Hat GPG Key:     Yes
    Content Unit Count:
    Last Sync:           2021-11-15 19:50:20
    Next Sync:           2021-11-16 01:55:00
    
    Name:                Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4)
    ID:                  rhel-8-for-aarch64-appstream-source-rhui-rpms-8.4
    Type:                Red Hat
    Version:             0
    Relative Path:       content/dist/rhel8/rhui/8.4/aarch64/appstream/source/SRPMS
    GPG Check:           Yes
    Custom GPG Keys:     (None)
    Red Hat GPG Key:     Yes
    Content Unit Count:
    Last Sync:           2021-11-15 15:56:51
    Next Sync:           2021-11-15 22:00:00

Verification

  1. A similar output displays for your selections.

2.4. Generating a repository status file

You can generate a machine-readable JSON file that displays the status of all RHUI repositories as well as provides some additional information. This is useful, for example, if you want to passively monitor the status of the repositories.

2.4.1. Generating a status file for RHUI repositories

You can use the rhui-manager command to obtain the status of each repository in a machine-readable format.

Procedure

2.4.2. List of dictionary keys in the repository status JSON file

A machine-readable JSON file is created when you run the command to get the status of each RHUI repository. The JSON file contains a list of dictionaries with one dictionary for each repository.

List of dictionary keys for custom repositories

Table 2.1. List of dictionary keys for custom repositories
KeyDescription

base_path

The path of the repository.

description

The name of the repository.

group

The group the repository belongs to. It is always set to the string, custom.

id

The repository ID.

name

The name of the repository. It is the same as the repository ID.

List of dictionary keys for Red Hat repositories

Table 2.2. List of dictionary keys for Red Hat repositories
KeyDescription

base_path

The path of the repository.

description

The name of the repository.

group

The group the repository belongs to. It is always set to the string, redhat.

id

The repository ID.

last_sync_date

The date and time the repository was last synchronized. The value is null if the repository was never synchronized.

last_sync_exception

The exception raised if the repository failed to synchronize. The value is null if the repository was synchronized correctly.

last_sync_result

The result of the synchronization task.

The values are:

  • completed: If the repository synchronized correctly.
  • null: If the repository was never synchronized.
  • failed: If the synchronization failed.
  • running: If a synchronization task is currently running.

last_sync_traceback

The traceback that was logged if the repository failed to synchronize. The value is null if the repository was synchronized correctly or was never synchronized.

metadata_available

A boolean value denoting whether metadata is available for the repository.

name

The name of the repository. It is the same as the repository ID.

next_sync_date

The date and time of the next scheduled synchronization of the repository. If a synchronization task is currently running, the value is running.

repo_published

A boolean value denoting whether this repository has been published in RHUI. Note that, by default, RHUI is configured to automatically publish repositories.

2.5. Adding a new Red Hat content repository

Based on the upstream Pulp project, RHUI allows cloud providers to locally mirror Red Hat-hosted repository content, create custom repositories with their own content, and make those repositories available to end users through a load-balanced content delivery system.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press a to select add a new Red Hat content repository.
  4. Wait for the Red Hat Update Infrastructure Management Tool to determine the entitled repositories. This might take several minutes:

    rhui (repo) => a
    
    Loading latest entitled products from Red Hat...
    ... listings loaded
    Determining undeployed products...
    ... product list calculated
  5. The Red Hat Update Infrastructure Management Tool prompts for a selection method:

    Import Repositories:
        1 - All in Certificate
        2 - By Product
        3 - By Repository
    Enter value (1-3) or 'b' to abort:
  6. Press 2 to select the By Product method.
  7. Select which repositories to add by typing the number of the repository at the prompt. You can also choose the range of repositories, for instance, by entering 1 - 5.

    Enter value (1-620) to toggle selection, 'c' to confirm selections, or '?' for more commands:
  8. Continue until all repositories you want to add are checked.
  9. Press c when you are finished selecting the repositories. The Red Hat Update Infrastructure Management Tool displays the repositories for deployment and prompts for confirmation:

    The following products will be deployed:
      Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI
      Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI
    Proceed? (y/n)
  10. Press y to proceed. A message indicates each successful deployment:

    Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8)...
    
    Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.4)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.3)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.2)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.1)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.0)...
      Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8)...
    
    Content will not be downloaded to the newly imported repositories
    until the next sync is run.

Verification

  1. From the Repository Management screen, press l to check that the correct repositories have been installed.

2.6. Adding a new Red Hat content repository using an input file

In Red Hat Update Infrastructure 4.2 and later, you can add custom repositories using a configured YAML input file. You can find an example template of the YAML file on the RHUA node in the /usr/share/rhui-tools/examples/repo_add_by_file.yaml directory.

This functionality is only available in the command-line interface (CLI).

Prerequisites

  • Ensure that you have root access to the RHUA node.

Procedure

  1. On the RHUA node, create a YAML input file in the following format:

    # cat /my_home/example.yaml
    ---
    name: Example_YAML_File
      repo_ids:
        - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.1
        - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.2
        - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.4
        - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.6
    ---
  2. Add the repositories listed in the input file using the rhui-manager utility:

    # rhui-manager repo add_by_file --file /my_home/example.yaml --sync_now
    The name of the repos being added: Example_YAML_File
    Loading latest entitled products from Red Hat...
    ... listings loaded
    Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.1) (Yum)
    Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.2) (Yum)
    Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.4) (Yum)
    Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.6) (Yum)
    ... successfully scheduled for the next available timeslot.
    ... successfully scheduled for the next available timeslot.
    ... successfully scheduled for the next available timeslot.
    ... successfully scheduled for the next available timeslot.

Verification

  • In the CLI, use the following command to list all the installed repositories and check whether the correct repositories have been installed:

    # rhui-manager repo list
  • In the RHUI Management Tool, on the Repository Management screen, press l to list all the installed repositories and check whether the correct repositories have been installed.

2.7. Creating a new custom repository (RPM content only)

You can create custom repositories that can be used to distribute updated client configuration packages or other non-Red Hat software to the RHUI clients. A protected repository for 64-bit RHUI servers (for example, client-rhui-x86_64) will be the preferred vehicle for distributing new non-Red Hat packages, such as an updated client configuration package, to the RHUI clients.

Like Red Hat content repositories, all of which are protected, protected custom repositories that differ only in processor architecture (i386 versus AMD64) are consolidated into a single entitlement within an entitlement certificate, using the $basearch yum variable.

In the event of certificate problems, an unprotected repository for RHUI servers can be used as a fallback method for distributing updated RPMs to the RHUI clients.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press c to select create a new custom repository (RPM content only).
  4. Enter a unique ID for the repository. Only alphanumeric characters, _ (underscore), and - (hyphen) are permitted. You cannot use spaces in the unique ID. For example, repo1, repo_1, and repo-1 are valid entries.

    Unique ID for the custom repository (alphanumerics, _, and - only):
  5. Enter a display name for the repository. This name is used to identify the repository within the Red Hat Update Infrastructure Management Tool.

    Display name for the custom repository [repo_1]:
  6. Specify the path that will host the repository. The path must be unique across all repositories hosted by RHUI. For example, if you specify the path at this step as some/unique/name, then the repository will be located at //server/pulp/repos/some/unique/name.

    Unique path at which the repository will be served [repo_1]:
  7. Select sha256 as the checksum type to be used for the repository metadata.

    Note

    Use sha256 when you create a custom repository for RHEL 6, RHEL 7, or RHEL 8. Use sha1 if you create repositories for RHEL 5 client.

    Algorithm to use when calculating the checksum values for repository metadata:
    
        1 - sha256 (default)
        2 - sha1 (RHEL 5)
    Enter value (1-2) or 'b' to abort:
  8. Choose whether to protect the new repository. If you answer no to this question, any client can access the repository. If you answer yes, only clients with an appropriate entitlement certificate can access the repository.

    Warning

    As the name implies, the content in an unprotected repository is available to any system that requests it, without any need for a client entitlement certificate. Be careful when using an unprotected repository to distribute any content, particularly content such as updated client configuration RPMs, which will then provide access to protected repositories.

  9. Answer yes or no to the following questions as they appear:

    Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n)
    
    Will the repository be used to host any Red Hat GPG signed content? (y/n)
    
    Will the repository be used to host any custom GPG signed content? (y/n)
    
    Enter the absolute path to the public key of the GPG key pair:
    
    Would you like to enter another public key? (y/n)
    
    Enter the absolute path to the public key of the GPG key pair:
    
    Would you like to enter another public key? (y/n)
  10. The details of the new repository displays. Press y at the prompt to confirm the information and create the repository.

Verification

  1. From the Repository Management screen, press l to check that the correct repositories have been installed.

2.8. Deleting a repository from RHUI 4

When the Red Hat Update Infrastructure Management Tool deletes a Red Hat repository, it deletes the repository from the RHUA and all applicable CDS nodes.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press d at the prompt to delete a Red Hat repository. A list of all repositories currently being managed by RHUI displays.
  4. Select which repositories to delete by typing the number of the repository at the prompt. Typing the number of a repository places a checkmark next to the name of that repository. You can also choose the range of repositories, for instance, by entering 1 - 5.
  5. Continue until all repositories you want to delete are checked.
  6. Press c at the prompt to confirm.

    Note

    After you delete the repositories, the client configuration RPMs that refer to the deleted repositories will not be available to be used by yum.

2.9. Uploading content to a custom repository (RPM content only)

You can upload multiple packages and upload to more than one repository at a time. Packages are uploaded to the RHUA immediately but are not available on the CDS node until the next time the CDS node synchronizes.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press u:

    Select the repositories to upload the package into:
      -    1: test
  4. Enter the value (1-1) to toggle the selection.
  5. Press c to confirm your selection.
  6. Enter the location of the packages to upload. If the location is an RPM, the file will be uploaded. If the location is a directory, all RPMs in that directory will be uploaded:

    /home/localuser/bear-4.1-1.noarch.rpm
    
    The following RPMs will be uploaded:
      bear-4.1-1.noarch.rpm
  7. Press y to proceed or n to cancel:

    Uploaded /home/ec2-user/bear-4.1-1.noarch.rpm

Verification

  1. A similar message displays if the content uploaded successfully:

    Uploaded /home/ec2-user/bear-4.1-1.noarch.rpm
    Total of 1 packages uploaded.
    1 RPM(s) associated to repo test.

2.10. Uploading content from a remote web site (RPM content only)

You can upload packages that are stored on a remote server without having to manually download them first. The packages must be accessible by HTTP, HTTPS, or FTP.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press ur:

    Select the repositories to upload the package into:
      -    1: test
  4. Enter the value (1-1) to toggle the selection.
  5. Press c to confirm your selection:

    ### WARNING ### WARNING ### WARNING ### WARNING ### WARNING ### WARNING ###
    #                                                                         #
    #   Content retrieved from non-Red Hat arbitrary places can contain       #
    #   unsupported or malicious software.  Proceed at your own risk.         #
    #                                                                         #
    ###########################################################################
  6. Enter the remote URL of the packages to upload. If the location is an RPM, the file will be uploaded. If the location is a web page, all RPMs linked off that page will be uploaded:

    https://www.google.com/url?q=https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-
    1.noarch.rpm&sa=D&source=docs&ust=1637381734614000&usg=AOvVaw2LGPli3y-CXIVAQJtbtKRw
    Retrieving https://www.google.com/url?q=https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm&sa=D&source=docs&ust=1637381734614000&usg=AOvVaw2LGPli3y-
    CXIVAQJtbtKRw
    Found 1 RPMs to download
    Retrieving https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm
    
    The following RPMs will be uploaded:
      bear-4.1-1.noarch.rpm
  7. Press y to proceed or n to cancel:

    Uploaded /tmp/rhui.318mfp81.tmp/bear-4.1-1.noarch.rpm

Verification

  1. A similar message displays if the content uploaded successfully:

    Uploaded /tmp/rhui.318mfp81.tmp/bear-4.1-1.noarch.rpm
    Total of 1 packages uploaded.
    1 RPM(s) associated to repo test.

2.11. Importing package group metadata to a custom repository

To allow RHUI users to view and install package groups or language packs, you can import a comps.xml or a comps.xml.gz file to a custom repository.

This functionality is only available in the command-line interface.

Prerequisites

  • Ensure that you have a valid comps.xml or comps.xml.gz file.
  • Ensure you have root access to the RHUA node.

Procedure

  • On the RHUA node, import data from a comps file to your custom repository using the rhui-manager utility:

    # rhui-manager repo add_comps --repo_id Example_Custom_Repo --comps /home/Example-Comps.xml

Verification

  • On a client system that uses the custom repository:

    1. Refresh the repository data:

      # yum clean metadata
    2. List the repository data and verify that the comps file has been updated:

      # yum grouplist

2.12. Removing content from a custom repository (Custom RPM content only)

You can remove packages from custom repositories using RHUI’s Text User Interface (TUI).

For the command-line interface (CLI) command, see Section 10.2, “Using RHUI 4 CLI options”.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Enter r to select manage repositories.
  3. On the Repository Management screen, enter r to select packages to remove from a repository (Custom RPM content only):

    -= Repository Management =-
    
       l   list repositories currently managed by the RHUI
       i   display detailed information on a repository
       a   add a new Red Hat content repository
       ac  add a new Red Hat container
       c   create a new custom repository (RPM content only)
       d   delete a repository from the RHUI
       u   upload content to a custom repository (RPM content only)
       ur  upload content from a remote web site (RPM content only)
       p   list packages in a repository (RPM content only)
       r   select packages to remove from a repository (Custom RPM content only)
  4. Enter the value to select the repository:

    Choose a repository to delete packages from:
        1 - Test-RPM-1
        2 - Test-RPM-2
  5. Enter the value to select the packages to delete.

    Select the packages to remove:
      -    1: example-package-1.noarch.rpm
      -    2: example-package-2.noarch.rpm
  6. Enter c to confirm selection.

    The following packages will be removed:
      example-package-1.noarch.rpm
  7. Enter y to proceed or n to cancel:

    Removed example-package-1.noarch.rpm

2.13. Listing the packages in a repository (RPM content only)

When listing repositories within the Red Hat Update Infrastructure Management Tool, only repositories that contain fewer than 100 packages display their contents. Results with more than 100 packages only display a package count.

Procedure

  1. Navigate to the Red Hat Update Infrastructure Management Tool home screen:

    [root@rhua ~]# rhui-manager
  2. Press r to select manage repositories.
  3. From the Repository Management screen, press p.
  4. Select the number of the repository you want to view. The Red Hat Update Infrastructure Management Tool asks if you want to filter the results. Leave the line blank to see the results without a filter.

    Enter value (1-1631) or 'b' to abort: 1
    
    Enter the first few characters (case insensitive) of an RPM to filter the results
    (blank line for no filter):
    
    Only filtered results that contain less than 100 packages will have their
    contents displayed. Results with more than 100 packages will display
    a package count only.
    
    Packages:
      bear-4.1-1.noarch.rpm

Verification

  1. One of three types of messages displays:

    Packages:
      bear-4.1-1.noarch.rpm
    Package Count: 8001
    No packages in the repository.

2.14. Limiting the number of repository versions

In Pulp 3, which is used in Red Hat Update Infrastructure 4, repositories are versioned. When a repository is updated in Red Hat CDN and synchronized in Red Hat Update Infrastructure, Pulp creates a new version.

By default, repositories added using Red Hat Update Infrastructure version 4.6 and earlier were configured to retain all repository versions. This resulted in data accumulating in the database indefinitely, taking up disk space and, in the worst case, the inability to delete a repository. With version 4.7 and newer, repositories are added with a version limit of 5. This means only the latest five versions are kept at all times, and any older version is automatically deleted. However, you may want to set the version limit for existing repositories added earlier and have any older versions deleted. You can do this for all your repositories at once or process one repository at a time.

  • The command to do this is as follows:

    [root@rhua ~]# rhui-manager repo set_retain_versions [--repo_id <ID> or --all] --versions <NUMBER>
  • For example, to limit the number of versions for all repositories to 5, one would run:

    [root@rhua ~]# rhui-manager repo set_retain_versions --all --versions 5

Depending on the number of repositories and existing repository versions, It can take more than an hour for all the necessary tasks to be scheduled, and up to a few days for the versions older than the limit to be deleted. You can watch the progress in the rhui-manager text user interface, on the synchronization screen, under running tasks.

2.15. Removing orphaned artifacts

RPM packages, repodata files, and other relates files are kept on the disk even if they are no longer part of a repository; for example, after a repository is deleted and the files do not belong to another repository, or when an update is made available and a new set of repodata files is synchronized.

  • To remove this obsolete content, one can run the following command:

    [root@rhua ~]# rhui-manager repo orphan_cleanup

Depending on the number of files, it can take up to several days for this task to complete. You can watch the progress in the rhui-manager text user interface, on the synchronization screen, under running tasks.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.