Fedora: upgrade to the next version of Fedora with dnf
dnf --refresh upgrade
dnf system-upgrade download --releasever=NN (This takes a long time since it downloads)
where NN is the next release version number.
dnf system-upgrade reboot (This step took me about 20 minutes)
This works going to Fedora 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39.
After its done it tells you that you can do:
dnf system-upgrade clean
dnf clean packages
to clean up
If that subcommand is missing, install it with:
dnf install python3-dnf-plugin-system-upgrade