Skip to content

Instantly share code, notes, and snippets.

@Habib0x0
Forked from yodermk/centos8-9.sh
Last active July 27, 2023 14:29
Show Gist options
  • Save Habib0x0/0fd3262faf8f6f26705fc9c73c6e0231 to your computer and use it in GitHub Desktop.
Save Habib0x0/0fd3262faf8f6f26705fc9c73c6e0231 to your computer and use it in GitHub Desktop.
Commands to live-upgrade CentOS Streams 8 -> 9
#
yum upgrade
reboot
dnf install epel-release
dnf install rpmconf
dnf install yum-utils
rpmconf -a # answer "n" to both things
package-cleanup --leaves
package-cleanup --orphans
dnf install https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-stream-release-9.0-12.el9.noarch.rpm https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-9.0-12.el9.noarch.rpm https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-9.0-12.el9.noarch.rpm
curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
curl -O https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
rpm -Uvh *.rpm
yum update
dnf clean all
rpm -e `rpm -q kernel`
dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync
dnf clean all
reboot
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
dnf -y groupupdate "Core" "Minimal Install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment