I'm looking for the equivalent of running apt install
with a package that came pre-installed on the system or was automatically installed as a dependency of another package. apt
then simply marks that package as manually installed, which means it won't be automatically uninstalled along with the package that depends on it or during autoremove
.
So far, I was unable to find any answer to this online. Running dnf install
with an auto-downloaded dependency simply prints "Nothing to do." but doesn't change the status of the package to manually installed. The dnf
man page didn't mention any special flags under the install command either.
The only "solution" so far was to uninstall the package (along with all packages that depend on it), manually reinstall it and then reinstall the dependent packages. That's not practical. Compared to that, even manually editing some file databases would be easier.