How to upgrade system packages offline?

Let’s be nicer to folks taking the time to help us out :slight_smile:

That would usually work, but in this case, because we’ve downloaded all deps and it’s a different machine that we want to install on dep resolution causes conflicts etc.

The best way, which should always work, is to create a local repository so that dnf has access to all the information it needs and can then do what it needs on any machine.

So we:

  • download all the required packages with their deps (you’ve already done this)
  • create a repository in the folder by running createrepo in it (once done, you’ll see a repodata folder has been created in the folder)
  • write a repo config file (based on the files in /etc/yum.repos.d/ it’ll be something like this):
[local]
name=local repo
baseurl=file:///path/to/folder/with/repodata/folder/and/rpms
enabled=0
gpgcheck=0
repo_gpgcheck=0
  • copy the folder and repo file to the other computer
  • check that the path in your repo file is correct, and update it as necessary
  • put the repo file in /etc/yum.repos.d/local.repo
  • install with dnf --disablerepo=* --enablerepo=local audacity

PS: can you please run your commands with LANG=C dnf .. so that the output is in English, just to make it easier for folks on the forum?

1 Like