Ask Your Question

dnf cannot resume cancelled download

asked 2015-05-27 11:08:59 -0600

yasharne gravatar image

Hi, I have installed fedora 22 and I don`t know much about dnf, but I have a problem, sometimes when i`m downloading a packages, and cancel it in the middle of downloading and again start to download it, I have to download again all packages that I have downloaded (like dependencies), how can I solve this?


edit retag flag offensive close merge delete


Avoid cancelling the download of repo information...and avoid canceling package download/package upgrade.

florian gravatar imageflorian ( 2015-05-27 20:39:14 -0600 )edit

@Florian Sometimes I have to, yum could handle this very good, dnf is newer so it should do that too

yasharne gravatar imageyasharne ( 2015-05-27 22:31:08 -0600 )edit

I miss yum-complete-transaction

anishjp gravatar imageanishjp ( 2015-05-28 03:44:52 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-05-28 14:37:32 -0600

yasharne gravatar image

updated 2015-06-27 03:13:42 -0600

I find the solution, you should add keepcache=1 to /etc/dnf/dnf.conf which is I don`t know why it isn`t there by default

edit flag offensive delete link more


I don't have keepcache=1 set. It is used to tell DNF to not remove downloaded packages after installing them. DNF don't/shouldn't remove packages if they are not installed yet. If it fixes your problem, it is still a bug. You can refer to man dnf.conf for more details.

hedayat gravatar imagehedayat ( 2015-05-29 01:20:15 -0600 )edit

@hedayat although I have reported this as a bug, but in the man page said Keep downloaded packages in the cache. The default is False., it didn`t mention after installing.

yasharne gravatar imageyasharne ( 2015-05-29 12:23:54 -0600 )edit

You're right, dnf manual doesn't say that explicitly. :P BTW, man yum.conf say it more explicitly, and DNF is supposed to be yum-compatible in this regard (and as I said, it does indeed behave as such in my system right now):

keepcache Either `1' or `0'. Determines whether or not yum keeps
              the cache of headers and packages after successful installation.
              Default is '1' (keep files)
hedayat gravatar imagehedayat ( 2015-05-29 22:55:45 -0600 )edit

answered 2015-05-28 04:06:10 -0600

hedayat gravatar image

updated 2015-06-22 02:25:58 -0600

Update: This is the relevant bug report:

"Normally" DNF does the right thing in such situations. I already am in the same situation, and you can see DNF output (many lines removed to simplify output):

[root@localhost pkgs]# dnf -C install @kde-apps
Cache-only enabled but no cache for 'rpmfusion-nonfree-updates', disabling.
Dependencies resolved.
 Group                            Packages                                                                    
Marking installed:
 KDE Applications                 kdegames-minimal               konversation                  kolourpaint    
                                  krusader                       digikam                       kdenetwork-krdc
                                  ktorrent                       kdenetwork-krfb               ark            
 Package                            Arch             Version                           Repository         Size
 akonadi                            x86_64           1.13.0-12.fc22                    fedora            931 k
 ark                                x86_64           15.04.0-1.fc22                    fedora            301 k
 quazip                             x86_64           0.7.1-2.fc22                      fedora             88 k

Transaction Summary
Install  61 Packages

Total size: 86 M
Total download size: 24 M
Installed size: 291 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] kdegames-minimal-4.14.3-1.fc22.noarch.rpm: Already downloaded                                       
[SKIPPED] konversation-1.6-1.fc22.x86_64.rpm: Already downloaded                                              
[SKIPPED] libzip-0.11.2-5.fc22.x86_64.rpm: Already downloaded                                                 
[SKIPPED] kf5-kdelibs4support-5.10.0-1.fc22.x86_64.rpm: Already downloaded                                    
^CTerminated.igikam-4.10.0-3.fc22.x8 72% [=========================          ] ---  B/s |  62 MB     --:-- ETA

I've terminated it before downloading anything. As you can see, it skipped already downloaded packages and also is going to resume downloading digikam.

However, I've encountered that if DNF is cancelled while it is downloading repository metadata, it doesn't resume it and starts from scratch. I'm not sure if it always does this or just in some cases.

Anyway, if in your situation DNF doesn't behave correctly, please consider reporting a bug against it in , as it certainly should do the right thing.

edit flag offensive delete link more


Since repository metadata is always in flux, it is best to always keep it fresh. Download completion on repository information makes no sense. What if there was a change during the download itself? Continuing the download of obsolete metadata would be problematic.

NuuN gravatar imageNuuN ( 2015-07-03 23:43:05 -0600 )edit

Question Tools



Asked: 2015-05-27 11:08:08 -0600

Seen: 2,013 times

Last updated: Jun 27 '15