English French
`2.7.9` — the version of the updated package,
`6.fc22` — the release of the updated package,
`updates-testing` — the repository in which the updated package is located.
Updating Packages
indexterm:[DNF Updates,updating packages] You can choose to update a single package, multiple packages, or all packages at once. If any dependencies of the package, or packages, you update have updates available themselves, then they are updated too.
Updating a Single Packageindexterm:[DNF Updates,updating a single package]
To update a single package, run the following command as `root`:
dnf upgrade pass:quotes[_package_name_]
For example, to update the [package]*python* package, type:
~]# dnf upgrade python
Using metadata from Mon Apr 20 16:38:16 2015 (2:42:14 hours old)
Dependencies resolved.
==================================================================
Package Arch Version Repository Size
==================================================================
Upgrading:
python x86_64 2.7.9-6.fc22 updates 92 k
python-libs x86_64 2.7.9-6.fc22 updates 5.8 M
Transaction Summary
==================================================================
Upgrade 2 Packages
Total download size: 5.9 M
Is this ok [y/N]:
This output contains:
`python.x86_64` — you can download and install new [package]*python* package.
`python-libs.x86_64` — DNF has resolved that the [package]*python-libs-2.7.9-6.fc22.x86_64* package is a required dependency of the [package]*python* package.
DNF presents the update information and then prompts you as to whether you want it to perform the update; DNF runs interactively by default. If you already know which transactions DNF plans to perform, you can use the [option]`-y` option to automatically answer [command]#yes# to any questions DNF may ask (in which case it runs non-interactively). However, you should always examine which changes DNF plans to make to the system so that you can easily troubleshoot any problems that might arise.
If a transaction does go awry, you can view DNF's transaction history by using the [command]#dnf history# command as described in xref:DNF.adoc#sec-DNF-Transaction_History[Working with Transaction History].
Updating and installing kernels with DNF
DNF always *installs* a new kernel in the same sense that [application]*RPM* installs a new kernel when you use the command [command]#rpm -i kernel#. Therefore, you do not need to worry about the distinction between *installing* and *upgrading* a kernel package when you use the [command]#dnf# command: it will do the right thing, regardless of whether you are using the [command]#dnf upgrade# or [command]#dnf install# command.
When using [application]*RPM*, on the other hand, it is important to use the [command]#rpm -i kernel# command (which installs a new kernel) instead of [command]#rpm -u kernel# (which *replaces* the current kernel). See xref:RPM.adoc#sec-Installing_and_Upgrading[Installing and Upgrading Packages] for more information on installing and updating kernels with [application]*RPM*.