#!/usr/bin/env bash # Copyright (C) 2026 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only set -ex echo "set WritePreparedUpdates=false" | sudo tee -a /etc/PackageKit/PackageKit.conf sudo systemctl stop packagekit sudo systemctl mask --now packagekit while sudo fuser /usr/libexec/packagekitd >/dev/null 2>&1; do echo "Waiting for PackageKit to finish..." sleep 1 sudo systemctl stop packagekit done sudo yum -y remove PackageKit gnome-software sudo subscription-manager config --rhsm.manage_repos=0 sudo subscription-manager refresh # List available RHEL versions and bind with correct one sudo subscription-manager release --list # Do not update Tier 1 via GUI without using this same --set # - To avoid System to have newer packages than RPMS which will cause update issues # - Note! This will only work with RHEL official RPMs - Not with internal repo clones sudo subscription-manager release --set=10.0 sudo yum clean all # Internal repo-clones must have exact release numbers to lock packages correctly sudo tee "/etc/yum.repos.d/local.repo" > /dev/null < /dev/null <