1、确认当前 Repository 已经切换为 Fedora 的官方源
2、依次执行
dnf upgrade --refresh -y
dnf install dnf-plugin-system-upgrade -y
dnf system-upgrade download --releasever=39 -y
dnf system-upgrade reboot
*****************************************************************************************************
详细过程:
[root@fedora fedora]# cat /etc/yum.repos.d/fedora-modular.repo
[fedora-modular]
name=Fedora Modular $releasever - $basearch
baseurl=http://mirrors.aliyun.com/fedora/releases/$releasever/Modular/$basearch/os/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever\&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[fedora-modular-debuginfo]
name=Fedora Modular $releasever - $basearch - Debug
baseurl=http://mirrors.aliyun.com/fedora/releases/$releasever/Modular/$basearch/debug/tree/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-debug-$releasever\&arch=$basearch
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[fedora-modular-source]
name=Fedora Modular $releasever - Source
baseurl=http://mirrors.aliyun.com/fedora/releases/$releasever/Modular/source/tree/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-source-$releasever\&arch=$basearch
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[root@fedora fedora]#
[root@fedora fedora]# ls -F /etc/yum.repos.d/
_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo fedora-modular.repo.original fedora-updates-modular.repo.original fedora-updates-testing-modular.repo.original rpmfusion-nonfree-nvidia-driver.repo
docker-ce.repo fedora.repo fedora-updates.repo fedora-updates-testing.repo rpmfusion-nonfree-steam.repo
fedora-cisco-openh264.repo fedora.repo.original fedora-updates.repo.original fedora-updates-testing.repo.original
fedora-modular.repo fedora-updates-modular.repo fedora-updates-testing-modular.repo google-chrome.repo
[root@fedora fedora]#
[root@fedora fedora]# mv /etc/yum.repos.d/fedora-modular.repo /etc/yum.repos.d/fedora-modular.repo.38.Aliyun
[root@fedora fedora]#
[root@fedora fedora]# cp /etc/yum.repos.d/fedora-modular.repo.original /etc/yum.repos.d/fedora-modular.repo
[root@fedora fedora]#
[root@fedora fedora]# cat /etc/yum.repos.d/fedora-modular.repo
[fedora-modular]
name=Fedora Modular $releasever - $basearch
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Modular/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever\&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[fedora-modular-debuginfo]
name=Fedora Modular $releasever - $basearch - Debug
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Modular/$basearch/debug/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-debug-$releasever\&arch=$basearch
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[fedora-modular-source]
name=Fedora Modular $releasever - Source
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Modular/source/tree/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-source-$releasever\&arch=$basearch
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-releasever-basearch
skip_if_unavailable=False
[root@fedora fedora]#
[root@fedora fedora]# dnf upgrade --refresh -y
Copr repo for PyCharm owned by phracek 1.3 kB/s | 2.1 kB 00:01
Docker CE Stable - x86_64 11 kB/s | 3.5 kB 00:00
Fedora 38 - x86_64 27 kB/s | 6.1 kB 00:00
Fedora 38 openh264 (From Cisco) - x86_64 559 B/s | 989 B 00:01
Fedora Modular 38 - x86_64 162 kB/s | 177 kB 00:01
Fedora 38 - x86_64 - Updates 42 kB/s | 8.1 kB 00:00
Fedora Modular 38 - x86_64 - Updates 28 kB/s | 4.9 kB 00:00
google-chrome 4.2 kB/s | 1.3 kB 00:00
RPM Fusion for Fedora 38 - Nonfree - NVIDIA Driver 11 kB/s | 15 kB 00:01
RPM Fusion for Fedora 38 - Nonfree - Steam 12 kB/s | 14 kB 00:01
Dependencies resolved.
Nothing to do.
Complete!
[root@fedora fedora]#
[root@fedora fedora]# dnf install dnf-plugin-system-upgrade -y
Last metadata expiration check: 0:00:17 ago on Sat 18 Nov 2023 12:25:10 PM CST.
Package dnf-plugins-core-4.4.3-1.fc38.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@fedora fedora]#
[root@fedora fedora]# dnf system-upgrade download --releasever=39 -y
Copr repo for PyCharm owned by phracek 2.2 kB/s | 2.1 kB 00:00
Docker CE Stable - x86_64 8.6 kB/s | 3.5 kB 00:00
Fedora 39 - x86_64 34 kB/s | 6.1 kB 00:00
Fedora 39 openh264 (From Cisco) - x86_64 902 B/s | 989 B 00:01
Fedora Modular 39 - x86_64 519 kB/s | 1.7 MB 00:03
Fedora 39 - x86_64 - Updates 3.3 MB/s | 14 MB 00:04
Fedora Modular 39 - x86_64 - Updates 452 B/s | 257 B 00:00
google-chrome 4.1 kB/s | 3.6 kB 00:00
RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver 8.0 kB/s | 14 kB 00:01
RPM Fusion for Fedora 39 - Nonfree - Steam 1.4 kB/s | 2.2 kB 00:01
Dependencies resolved.
===============================================================================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================================================================
Installing:
kernel x86_64 6.5.11-300.fc39 updates 148 k
kernel-core x86_64 6.5.11-300.fc39 updates 16 M
kernel-modules x86_64 6.5.11-300.fc39 updates 57 M
kernel-modules-core x86_64 6.5.11-300.fc39 updates 31 M
kernel-modules-extra x86_64 6.5.11-300.fc39 updates 2.6 M
Upgrading:
Box2D x86_64 2.4.1-11.fc39 fedora 106 k
ImageMagick x86_64 1:7.1.1.15-1.fc39 fedora 82 k
ImageMagick-libs x86_64 1:7.1.1.15-1.fc39 fedora 2.5 M
LibRaw x86_64 0.21.1-5.fc39 fedora 417 k
ModemManager x86_64 1.20.6-3.fc39 fedora 1.2 M
ModemManager-glib x86_64 1.20.6-3.fc39 fedora 326 k
NetworkManager x86_64 1:1.44.2-1.fc39 updates 2.2 M
NetworkManager-adsl x86_64 1:1.44.2-1.fc39 updates 27 k
NetworkManager-bluetooth x86_64 1:1.44.2-1.fc39 updates 53 k
NetworkManager-config-connectivity-fedora noarch 1:1.44.2-1.fc39 updates 13 k
NetworkManager-libnm x86_64 1:1.44.2-1.fc39 updates 1.8 M
NetworkManager-openconnect x86_64 1.2.10-2.fc39 fedora 581 k
NetworkManager-openconnect-gnome x86_64 1.2.10-2.fc39 fedora 46 k
NetworkManager-openvpn x86_64 1:1.10.2-3.fc39 fedora 292 k
NetworkManager-openvpn-gnome x86_64 1:1.10.2-3.fc39 fedora 71 k
NetworkManager-ppp x86_64 1:1.44.2-1.fc39 updates 36 k
NetworkManager-pptp x86_64 1:1.2.12-3.fc39 fedora 143 k
NetworkManager-pptp-gnome x86_64 1:1.2.12-3.fc39 fedora 41 k
NetworkManager-team x86_64 1:1.44.2-1.fc39 updates 32 k
NetworkManager-vpnc x86_64 1:1.2.8-4.fc39 fedora 180 k
NetworkManager-vpnc-gnome x86_64 1:1.2.8-4.fc39 fedora 38 k
NetworkManager-wifi x86_64 1:1.44.2-1.fc39 updates 133 k
NetworkManager-wwan x86_64 1:1.44.2-1.fc39 updates 59 k
Upgrading Environment Groups:
Fedora Workstation
Upgrading Groups:
Anaconda tools
base-x
Container Management
Core
Firefox Web Browser
Fonts
GNOME
Guest Desktop Agents
Hardware Support
LibreOffice
Multimedia
Common NetworkManager Submodules
Printing Support
Fedora Workstation product core
Transaction Summary
===============================================================================================================================================================================================================
Install 134 Packages
Upgrade 1943 Packages
Remove 5 Packages
Downgrade 9 Packages
Total download size: 1.9 G
DNF will only download packages, install gpg keys, and check the transaction.
Total 3.9 MB/s | 1.9 GB 08:19
Fedora 39 - x86_64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x18B8E74C:
Userid : "Fedora (39) <fedora-39-primary@fedoraproject.org>"
Fingerprint: E8F2 3996 F232 1864 0CB4 4CBE 75CF 5AC4 18B8 E74C
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-39-x86_64
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Complete!
Transaction saved to /var/lib/dnf/system-upgrade/system-upgrade-transaction.json.
Download complete! Use 'dnf system-upgrade reboot' to start the upgrade.
To remove cached metadata and transaction use 'dnf system-upgrade clean'
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
[root@fedora fedora]#
[root@fedora fedora]# dnf system-upgrade reboot