Ask Your Question
1

dnf install without downloading metadata

asked 2017-06-20 03:55:07 -0600

dhekir gravatar image

I am currently experiencing issues with my Internet connection and my bandwidth is severely limited. So limited, in fact, that updating repository metadata whenever I do dnf install can be a problem, especially when installing very small packages (< 500 kB).

Is there a way to prevent dnf from auto-updating the repository? I mean, it has been updated in the last 2 or 3 days, so the probability that the package is no longer available is very low. I'd prefer the install command to fail than having to wait for the entire repository metadata (some MB in size) to be downloaded almost every time I want to perform even a minor dnf install.

The man page does mention --refresh to force a refresh, but I'd need something equivalent to the opposite option (e.g. --norefresh).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-06-20 07:04:34 -0600

vtrefny gravatar image

You are looking for the -C or --cacheonly parameter:

-C, --cacheonly
              Run entirely from system cache, don't update the cache and use it even in case it is expired.
edit flag offensive delete link more

Comments

Also check dnf.conf for metadata_expire: man dnf.conf

fcomida gravatar imagefcomida ( 2017-06-20 07:42:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-20 03:55:07 -0600

Seen: 521 times

Last updated: Jun 20 '17