always when I use dnf command it starts to update repositories and it takes a while, especially when OS is outdated. but sometimes I need to use dnf info or something like that and I don't need it to be updated. How can I use it in a way it does not search for update? any switch or something?

  • An alternative option is to learn the rpm commands that are local-only, e.g. rpm -qi packagename to get the info on an installed package. Jul 18, 2020 at 18:20

1 Answer 1


Use the --cacheonly (or -C) option; this will use the system cache only, without updating it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.