How to upgrade linux rocky offline?

Hi guys,

What should I do if I want to upgrade linux rocky offline?
e.g upgrade linux rocky 9.3 to 9.4 offline

How large version offline upgrade? Seems rocky not support that.
e.g upgrade linux rocky 8.9 to 9.1 offline

What do you mean offline? If you mean with no internet access, you need to sync the necessary repositories to another system and point your Rocky Linux repo files (in /etc/yum.repos.d/…) to it.

Upgrades are not supported.

Yes, I mean with no internet access. Is it will lost my data? Thanks.

Not lost.


How did you install if you have no internet access? I guess you did download install image somewhere that has network access, stored it into USB (or other removable media), and did move that into disconnected machine.

Updates would work the same way: download content of Rocky repositories into USB, move it into the machine, and configure dnf to use the repos that are on the USB.


Rocky 8.10 was merely a larger set of package updates for Rocky 8.
Rocky 8 and Rocky 9 are two distinct distros.

The default Rocky install creates two filesystems:

  • / for system files
  • /home for user files

(There are other filesystems too, but these are relevant for my point in the following.)

It is possible to make a new install that creates new /, but simply mount the existing /home. That way the user home directories, user data, stays intact.

What does not stay intact is what is in the /. Files installed from packages are not an issue, but configuration is. Part of that config are user accounts, e.g. /etc/passwd, etc – usernames, passwords, uid, gid, …

Other thing that is “user data” are data of (optional) services that are under /var; www, databases, containers, and so forth.


“To create new / volume” is bit tricky. The default install does allocate all disk to filesystems. Personally, I do always go custom and leave some of the disk unallocated.

With no unallocated space and XFS filesystem on volumes – XFS cannot shrink – the only remaining option is to overwrite the volume of existing /. That means that one needs external copy of config and user data that is not in /home. Well, one always wants to have a backup anyway.

It’s not clear enough.

If the machine is in a locked room with no internet access, it would already have some way to update it (e.g. pointing to repos on a different machine).

The normal dnf upgrade command won’t affect your data, but if you decide to do a fresh install you should back up the data.

The situation is like this, I now have a server with version 9.3 of Linux Rocky installed. I now want to upgrade it to version 9.4 of linux Rocky. This server is not connected to the internet and I can connect to the server using USB.

I don’t know the specific operation. (e.g. what should be downloaded, and then what commands should be run)