4 ms·
The flag you're thinking of is '-C | --cacheonly'. It is very useful for doing stuff like 'dnf [search|rq|list|etc...]', but it is not allowed with upgrade/inst
by mroche 5y ago
The flag you're thinking of is '-C | --cacheonly'. It is very useful for doing stuff like 'dnf [search|rq|list|etc...]', but it is not allowed with upgrade/install type runs.
dnf will do a check when running subcommands like 'install' to see if it _needs_ to update the cache data (as you noted), it won't always do it. There are a few factors that play in, but you can also adjust the cache expiry time in dnf.conf.