...
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'.
-----
My sense is that those two dnf commands are things the sys.admin. does
if something goes wrong and he has to back-track (or start over). Am I
correct, or should I do those? By the way, the dnf man page makes no
mention of a system-upgrade command.
And who is the "sys.admin" and does the "sys.admin"-tasks on your box
?
according to this link:
https://dnf-plugins-extras.readthedocs.io/en/latest/system-upgrade.html
there is no explanation of 'dnf system-upgrade clean' !
so what it really does I don't know, but (I guess) it mainly removes stuff you
don't need anymore !
stuff that was only necessary for the upgrade process/task. I guess mainly packages which
are installed or somewhat better: the contents of these packages is copied to their target
directories (see below).
for 'dnf clean packages'
see
https://dnf.readthedocs.io/en/latest/command_ref.html#clean-command
the command cleans under /var/cache/dnf/ and this directory is filled/updated (again !!!)
during any run of "sudo dnf upgrade"
so if you clean there there is no harm !
why ?
a try of an explanation:
==================
lets say you want upgrade/install a package and let's say it's name is
"config.rpm".
let's assume it contains mainly configuration files for the target directory /etc
if you do "dnf upgrade" or "dnf install config.rpm" mainly two tasks
are executed:
a) config.rpm is downloaded (!) to /var/cache/dnf
and
b) config.rpm is installed (!), what mainly means it's contents is "copied"
to it's target directory /etc
after both tasks there is no need to keep the packages "config.rpm" under
/var/cache/dnf/ anymore.
after installation it has done it's purpose !
with other packages it works analogous -maybe other target directories are involved-
Okay ?