Zypper “download only” option

Sometimes on an openSUSE box I want to be able to pre-download the packages and install at a later date. By default, it downloads each package and installs it before the moving onto the next one. If the update is interrupted, then you can end up with a broken system (it’s happened a few times).

Now I’ve found out how to enable cache and download only with zypper

Zypper can enable cache on a per-repository basis (pretty neat), or you can set them all up like so:
zypper mr -k -all

Now that you have cache enabled, just do a dry-run which will download everything, but not install them:
zypper -l -y update --dry-run

And there you are..

6 thoughts on “Zypper “download only” option

  1. ‘zypper update –download-only’ is the correct option. dry-run does not download. The download only option has been an improvement in later versions of libzypp amongst a few other available in the manual.

  2. Hi , if I tried download only option I get packages without kernel packages downlading and I would see a message like “package locked could not made any changes” could you please let me know how to fix this and kernel package too getting downloaded

  3. Hi Kart, sorry I’m not sure. That post was a long time ago and perhaps things have changed? I don’t use SUSE often anymore, maybe someone can help you on their IRC channel or something?

  4. hey, is there a way to just get the urls of the packages and its dependencies instead of downloading or installing them

  5. Not that I’m aware of, without resorting to logs in a proxy or something… but it’s been a while since I’ve used zypper.

Leave a Reply

Your email address will not be published. Required fields are marked *