So I downloaded an update pack last night on my Fedora 42 using KDE Discover, then shut down the computer with a regular shutdown instead of the ‘Shut down & update’ option, thinking that the updates would be installed the next time when I start the computer tomorrow. To my surprise, that didn’t happen. Why not?
Did I miss the point or something, or it’s just how it works? I either reboot & update or pick the Shut Down & update in order for those updates to apply, and if picking the regular shutdown, Fedora kinda like “forgets” to apply the queued updates?
My PC specs
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.15.9-201.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6500 CPU @ 3.20GHz
Memory: 16 GiB of RAM (15.6 GiB usable)
Graphics Processor: NVIDIA GeForce GTX 1050 Ti
Manufacturer: MSI
Product Name: MS-7972
System Version: 2.0
That’s just how it works. If you choose Update & Reboot or Update & Shutdown, then dnf (the Fedora package manager) performs the update. These two actions correspond to the commands dnf offline reboot and dnf offline reboot --poweroff. If you shut down or reboot normally, dnf does nothing and no update is applied.
this is exactly how its supposed to work yeah but this functionality is actually there for a reason. for example when you need to restart your pc but need it back up very fast, you can choose to just reboot without installing updates alongside, which will always take some more time.
afaik “shutdown and update” only installs the updates the next time you start your pc, not while shutting down
Okay, so what happened to the downloaded updates? KDE Discover downloaded about 500 megabytes. Where did that data go? I had to re-download them today along with additional new updates. Does Fedora purge the update cache if you don’t select “Shutdown & Update”? That doesn’t make sense to me.
You mentioned there’s a reason for this behavior, but could you elaborate on the actual reason? You wrote that if I need to restart my PC quickly, I can choose to reboot without installing updates, which takes more time. However, that’s not my situation. I needed to shut down my PC quickly, and I specifically asked about shutdown because if I select “Shutdown & Update,” it reboots, installs the updates, and then shuts down. I chose a regular shutdown instead of “Shutdown & Update” because I was in a hurry. I expected the already downloaded updates to be installed / applied the next time I booted up, but that didn’t happen, which seems odd to me. I’m not sure if the developers intended it to work this way. As far as I know, Fedora’s immutable editions handle this differently like, if you download a large update but need to power off quickly, the update is applied the next time you boot, so no downloaded data is wasted.
Imagine people with metered connections who download 2–3 GB of updates but are in a rush and choose to power off instead of selecting “Update & Poweroff.” The next time they boot, they expect those already downloaded 2–3 GB of updates to be installed, not to have to re-download them. It feels redundant and wasteful of data limits.
That’s my main issue. It doesn’t work that way. If you select “Shutdown & Update,” the PC starts installing updates, reboots, continues installing updates, and then finally shuts down. If it worked the way you thought (installing updates only on the next boot) I would have chosen that option. See, even you expected that behavior just like me, but it’s not the case.
Yeah, that’s interesting. From what I can see of the way offline transactions are defined, there’s no deep reason why a “normal” shutdown couldn’t just retain the transaction on disk to be applied in future. But not sure how that interacts with other parts of the system, and particularly with what the Discover update service might be doing when you start up again.
Sorry, I made a mistake in my previous post. Discover still uses pkcon and dnf-3(dnf4?), which causes the inconsistency[1]. So instead of dnf offline, the correct command is pkcon offline-trigger, which performs the update and then reboots the system. And you can check prepared updates with pkcon offline-get-prepared.
As for your question about staged updates, this seems to be an issue on the pkcon side. When offline updates are staged using pkcon update -d, they are later removed by pkcon refresh or pkcon refresh force. Discover likely runs the refresh command after each reboot, which removes the previously staged updates[2].
Fedora Atomic desktops handle updates differently, given that they are image-based systems, where the new image is downloaded and deployed while the system is running. Hence, when rebooting, the new deployment is already available.
Actually, the expectation should be for the updates to be installed only if explicitly requested. But yes, the updates shouldn’t be re-downloaded.
Please also check with sudo dnf4 offline status, given that Discover works with PackageKit, which in turn still uses dnf4 AFAIK.
@yuntaz thank you, this might be related to the problem then. I hope Fedora team is aware of this, and doing a fix soon.
⋊> ~ sudo dnf4 offline status
No such command: offline. Please use /usr/sbin/dnf4 --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(offline)'"
⋊> ~ /usr/sbin/dnf4 --help
usage: dnf [options] COMMAND
List of Main Commands:
alias List or create command aliases
autoremove remove all unneeded packages that were originally installed as dependencies
check check for problems in the packagedb
check-update check for available package upgrades
clean remove cached data
deplist [deprecated, use repoquery --deplist] List package's dependencies and what packages provide them
distro-sync synchronize installed packages to the latest available versions
downgrade Downgrade a package
group display, or use, the groups information
help display a helpful usage message
history display, or use, the transaction history
info display details about a package or group of packages
install install a package or packages on your system
list list a package or groups of packages
makecache generate the metadata cache
mark mark or unmark installed packages as installed by user.
module Interact with Modules.
provides find what package provides the given value
reinstall reinstall a package
remove remove a package or packages from your system
repolist display the configured software repositories
repoquery search for packages matching keyword
repository-packages run commands on top of all packages in given repository
search search package details for the given string
shell run an interactive DNF shell
swap run an interactive DNF mod for remove and install one spec
updateinfo display advisories about packages
upgrade upgrade a package or packages on your system
upgrade-minimal upgrade, but only 'newest' package match which fixes a problem that affects your system
List of Plugin Commands:
builddep Install build dependencies for package or spec file
changelog A csomagok változásnapló adatainak megjelenítése
config-manager a(z) dnf konfigurációs beállítások és tárolók kezelése
copr Együttműködés a Copr tárolókkal.
debuginfo-install debuginfo csomagok telepítése
download Csomag letöltése a jelenlegi könyvtárba
groups-manager csoportok metaadat-fájljainak létrehozása és szerkesztése
needs-restarting határozza meg az újraindítást igénylő frissített binárisokat
offline-distrosync A rendszer offline disztribúciófrissítésének előkészítése
offline-upgrade A rendszer offline frissítésének előkészítése
playground Együttműködés a Playground tárolóval.
repoclosure A tárolók kielégítetlen függőségeinek megjelenítése
repodiff Különbségek felsorolása két tárolókészlet között
repograph A teljes függőségi gráf kiírása pontozott formában
repomanage Egy rpm csomagokkal teli könyvtár kezelése
reposync minden csomag letöltése a távoli tárolóból
system-upgrade Rendszer előkészítése az új verzióra történő frissítéshez
General DNF options:
-c, --config CONFIG_FILE
config file location
-q, --quiet quiet operation
-v, --verbose verbose operation
--version show DNF version and exit
--installroot PATH] set install root
--nodocs do not install documentations
--noplugins disable all plugins
--enableplugin PLUGIN]
enable plugins by name
--disableplugin PLUGIN]
disable plugins by name
--releasever RELEASEVER
override the value of $releasever in config and repo files
--releasever-major RELEASEVER_MAJOR
override the value of $releasever_major in config and repo files
--releasever-minor RELEASEVER_MINOR
override the value of $releasever_minor in config and repo files
--setopt SETOPTS set arbitrary config and repo options
--skip-broken resolve depsolve problems by skipping packages
-h, --help, --help-cmd
show command help
--allowerasing allow erasing of installed packages to resolve dependencies
-b, --best try the best available package versions in transactions.
--nobest do not limit the transaction to the best candidate
-C, --cacheonly run entirely from system cache, don't update cache
-R, --randomwait MINUTES
maximum command wait time
-d, --debuglevel DEBUG_LEVEL
debugging output level
--debugsolver dumps detailed solving results into files
--showduplicates show duplicates, in repos, in list/search commands
-e, --errorlevel ERRORLEVEL
error output level
--obsoletes enables dnf's obsoletes processing logic for upgrade or display capabilities that the package obsoletes for info, list and repoquery
--rpmverbosity DEBUG_LEVEL_NAME
debugging output level for rpm
-y, --assumeyes automatically answer yes for all questions
--assumeno automatically answer no for all questions
--enablerepo REPO Temporarily enable repositories for the purpose of the current dnf command. Accepts an id, a comma-separated list of ids, or a glob of ids. This option can
be specified multiple times.
--disablerepo REPO Temporarily disable active repositories for the purpose of the current dnf command. Accepts an id, a comma-separated list of ids, or a glob of ids. This
option can be specified multiple times, but is mutually exclusive with `--repo`.
--repo, --repoid REPO
enable just specific repositories by an id or a glob, can be specified multiple times
--enable enable repos with config-manager command (automatically saves)
--disable disable repos with config-manager command (automatically saves)
-x, --exclude, --excludepkgs PACKAGE
exclude packages by name or glob
--disableexcludes, --disableexcludepkgs {all, main, REPOID}
disable excludepkgs
--repofrompath REPO,PATH
label and path to an additional repository to use (same path as in a baseurl), can be specified multiple times.
--noautoremove disable removal of dependencies that are no longer used
--nogpgcheck disable gpg signature checking (if RPM policy allows)
--color COLOR control whether color is used
--refresh set metadata as expired before running the command
-4 resolve to IPv4 addresses only
-6 resolve to IPv6 addresses only
--destdir, --downloaddir DESTDIR
set directory to copy packages to
--downloadonly only download packages
--transient Use a transient overlay which will reset on reboot
--comment COMMENT add a comment to transaction
--bugfix Include bugfix relevant packages, in updates
--enhancement Include enhancement relevant packages, in updates
--newpackage Include newpackage relevant packages, in updates
--security Include security relevant packages, in updates
--advisory, --advisories ADVISORY
Include packages needed to fix the given advisory, in updates
--bz, --bzs BUGZILLA Include packages needed to fix the given BZ, in updates
--cve, --cves CVES Include packages needed to fix the given CVE, in updates
--sec-severity, --secseverity {Critical,Important,Moderate,Low}
Include security relevant packages matching the severity, in updates
--forcearch ARCH Force the use of an architecture
Right, dnf4 has a slightly different syntax. dnf4 offline-upgrade is the plugin for offline transactions. However, it doesn’t seem to have a status command.