Hi everyone, this is a very basic question about dnf
, yet I haven’t been able to find an answer.
The issue
I wanted to do some early-summer cleaning with dnf
. I ran dnf check
and got a long list of duplicates:
Check discovered 120 problem(s) in 120 package(s)
I learned this is a common issue arising in the case of interrupted installations.
A try at solving
Now, if I try the commands that worked for this user (Fix duplicate packages detected by `dnf check`), that is,
sudo dnf distro-sync
sudo dnf remove --duplicates
I get two errors.
1. dnf distro-sync
On sudo dnf distro-sync
,
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem: The operation would result in removing the following protected packages: systemd, systemd-udev
You can try to add to command line:
--skip-broken to skip uninstallable packages
What to do? This seems to be the main problem.
2. dnf remove --duplicates
Then, on sudo dnf remove --duplicates
,
Unknown argument "--duplicates" for command "remove". Add "--help" for more information about the arguments.
The argument is available for commands: check, repoquery. (It has to be placed after the command.)
It appears, this doesn’t work anymore on DNF5. An user had the same issue here (Run dnf remove --duplicates but received Unknown argument "--duplicates"), and the answer by the ubiquitous @tqcharm is marked as the solution. They say:
Does the command
sudo dnf repoquery --duplicates
return any packages? If it doesn’t, then there is no need to remove any.
Now, in my case this command returns a long list of packages, including the aforementioned systemd- series.
P.S.
I understand that the problems are two, and may require opening two different topics; but I reckon they stem from the same dnf check
operation.
Also, can someone link to a good, up-to-date manual for DNF5?
Thanks in advance