Ask Your Question
0

How to download updates for offline installation .

asked 2018-06-19 08:25:24 -0600

rajgopal4 gravatar image

Hello ,

I have created a user with standard privileges . I want to download updates and i am typing this command

dnf download --resolve upgrade .

but I am getting this error.

No package upgrade available. Exiting due to strict setting. Error: No package upgrade available.

what is the procedure for a standard user to download upgrades ?

edit retag flag offensive close merge delete

Comments

Initially the command "dnf download --resolve upgrade" downloaded 60MB+ then the update stopped with the error "No package upgrade available"

rajgopal4 gravatar imagerajgopal4 ( 2018-06-19 08:59:47 -0600 )edit

here is what --resolve does: resolve capabilities to originating package(s). That's not what you want here. The command download is not documented (probably just ignored in your command).

The 60+MB that dnf downloaded is just metadata, meaning information about all available packages in the enabled repositories but no single package itself. dnf will ask you [y/N] before performing a transaction that changes your system.

Fedora 28 - x86_64 - Updates             5.6 MB/s |  16 MB     00:02    
Fedora 28 - x86_64                              8.3 MB/s |  60 MB     00:07
florian gravatar imageflorian ( 2018-06-19 13:37:05 -0600 )edit

I am new to Fedora . Any alternative for dnf command which only downloads the packages without installing .

rajgopal4 gravatar imagerajgopal4 ( 2018-06-19 22:01:39 -0600 )edit

Why another package manager, when dnf does the job perfectly fine?

The other option is using PackageKit, it's command line tool is called pkcon. (see man pkcon for a list of options); pkcon -d update lets you "Prepare the transaction by downloading packages only". (I'll add that to my answer.

florian gravatar imageflorian ( 2018-06-20 10:08:04 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
0

answered 2018-06-20 21:15:17 -0600

rajgopal4 gravatar image

Get all the package names for downloading offline .

dnf repoquery --upgrade --queryformat '%{name}.%{arch}'

copy all the package names from terminal and then save in a .txt file , in my case I named the file as "Update.txt"

and then download all the required packages with this command

dnf download --resolve $(cat Update.txt)

now login as root user and finally apply the updates with this command

pkcon install-local /path-to-rpm-files

edit flag offensive delete link more
0

answered 2018-06-20 13:20:11 -0600

rajgopal4 gravatar image

With this set of commands I am able to download the updates from a standard user

dnf repoquery --upgrade --queryformat '%{name}.%{arch}'

copy all the package names from terminal and then save in a .txt file , in my case I named the file as "Update.txt"

and then download all the required packages with this command

dnf download --resolve $(cat Update.txt)

My question is how will I now apply this updates from my root user account

I tried this command but did not work .

sudo rpm -ivh *.rpm

please help me to apply the downloaded upgrades .

edit flag offensive delete link more

Comments

You and your dnf download command. Don't expect it to work next week - it's not even documented. Have you read the documentation that I linked?

As for the update, simply use sudo dnf install $(cat updates.txt) (you can also redirect the output of the repoquery command to updates.txt directly (use >).

But again, I would suggest doing it differently if you serve 120 clients with updates and you want to download the updates only once and then serve them in your network. Have you discovered the keep_cacheoption (http://dnf.readthedocs.io/en/latest/c... Or setup local repo.

florian gravatar imageflorian ( 2018-06-20 14:30:42 -0600 )edit

applied the upgrades with the following command pkcon install-local /path-to-rpm-files

rajgopal4 gravatar imagerajgopal4 ( 2018-06-20 21:09:32 -0600 )edit
0

answered 2018-06-19 13:06:12 -0600

florian gravatar image

updated 2018-06-20 10:17:30 -0600

The command you are looking for is

dnf upgrade --downloadonly

(You will have to run this command with sudo or as root user.)

See: https://dnf.readthedocs.io/en/latest/..., and specifically here

Edit: Add alternative

If you don't want to use dnf, you can use PackageKit's command line tool pkcon

pkcon -d update

will "Prepare the transaction by downloading packages only" (check documentation: man pkcon)

edit flag offensive delete link more

Comments

It looks like the user doesn't have root access, so I think he's a bit out of luck.

Take a look at the comment on the other answer.

abadrinath gravatar imageabadrinath ( 2018-06-20 01:39:32 -0600 )edit
0

answered 2018-06-19 10:35:59 -0600

jo_117 gravatar image

Try running sudo command with the above command.

Or simply log in as a root user.

edit flag offensive delete link more

Comments

No my dear . That is not what I want . because of this reason .

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

root's password:

rajgopal4 gravatar imagerajgopal4 ( 2018-06-19 12:25:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-19 08:24:15 -0600

Seen: 1,580 times

Last updated: Jun 20 '18