CentOS 7にdnfをインストールしてみました。
DNF (ソフトウェア)
https://ja.wikipedia.org/wiki/DNF_(ソフトウェア)
DNFまたはDandified Yum (ダンディファイド ヤム)は、RPMベースのパッケージ管理システムを採用しているLinuxディストリビューション用のパッケージマネージャであるYum 3.4のフォークであり、Yumの事実上の後継バージョン
環境
・CentOS Linux release 7.4.1708 (Core)
.Kernel 3.10.0-693.11.1.el7.x86_64
epel repoを利用してdnfをインストールする方法があったのですが、今は削除されているようです。
centos 7.4 can not install dnf
from epel
https://serverfault.com/questions/874471/centos-7-4-can-not-install-dnffrom-epel
WARNING: EPEL 7 DNF is very old and has issues to include security flaws. This appears to be the reason it was removed.
そこで記事中にある方法でインストールしてみました。
RedHatベースのカスタムOSを提供しているプロジェクトのdnfパッケージです。
Springdale Linux (SDL) / Formerly known as PUIAS Linux
http://springdale.math.ias.edu/
Custom Red Hat®-based Distribution and Mirror. A project of members of the computing staff of Princeton University and the Institute for Advanced Study.
- パッケージのダウンロード
- インストール
下記サイトから必要なパッケージをダウンロードします。
http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/
dnf-yum-0.6.4-2.sdl7.noarch.rpmはyumをdnfに置き換えるパッケージのようで、dnf-automatic-0.6.4-2.sdl7.noarch.rpmは自動アップデートのパッケージのようです。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm --2017-12-10 14:15:04-- http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/dnf-conf-0.6.4-2.sdl7.noarch.rpm Resolving springdale.math.ias.edu (springdale.math.ias.edu)... 192.16.204.192 Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 62404 (61K) [application/x-rpm] Saving to: 'dnf-conf-0.6.4-2.sdl7.noarch.rpm' 100%[====================================================================>] 62,404 109KB/s in 0.6s 2017-12-10 14:15:05 (109 KB/s) - 'dnf-conf-0.6.4-2.sdl7.noarch.rpm' saved [62404/62404] # wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm --2017-12-10 14:15:05-- http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64//dnf-0.6.4-2.sdl7.noarch.rpm Resolving springdale.math.ias.edu (springdale.math.ias.edu)... 192.16.204.192 Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 213696 (209K) [application/x-rpm] Saving to: 'dnf-0.6.4-2.sdl7.noarch.rpm' 100%[====================================================================>] 213,696 141KB/s in 1.5s 2017-12-10 14:15:07 (141 KB/s) - 'dnf-0.6.4-2.sdl7.noarch.rpm' saved [213696/213696] # wget http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm --2017-12-10 14:15:12-- http://springdale.math.ias.edu/data/puias/unsupported/7/x86_64/python-dnf-0.6.4-2.sdl7.noarch.rpm Resolving springdale.math.ias.edu (springdale.math.ias.edu)... 192.16.204.192 Connecting to springdale.math.ias.edu (springdale.math.ias.edu)|192.16.204.192|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 416988 (407K) [application/x-rpm] Saving to: 'python-dnf-0.6.4-2.sdl7.noarch.rpm' 100%[====================================================================>] 416,988 202KB/s in 2.0s 2017-12-10 14:15:15 (202 KB/s) - 'python-dnf-0.6.4-2.sdl7.noarch.rpm' saved [416988/416988] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# yum install python-dnf-0.6.4-2.sdl7.noarch.rpm dnf-0.6.4-2.sdl7.noarch.rpm dnf-conf-0.6.4-2.sdl7.noarch.rpm Loaded plugins: fastestmirror Examining python-dnf-0.6.4-2.sdl7.noarch.rpm: python-dnf-0.6.4-2.sdl7.noarch Marking python-dnf-0.6.4-2.sdl7.noarch.rpm to be installed Examining dnf-0.6.4-2.sdl7.noarch.rpm: dnf-0.6.4-2.sdl7.noarch Marking dnf-0.6.4-2.sdl7.noarch.rpm to be installed Examining dnf-conf-0.6.4-2.sdl7.noarch.rpm: dnf-conf-0.6.4-2.sdl7.noarch Marking dnf-conf-0.6.4-2.sdl7.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package dnf.noarch 0:0.6.4-2.sdl7 will be installed ---> Package dnf-conf.noarch 0:0.6.4-2.sdl7 will be installed --> Processing Dependency: libreport-filesystem for package: dnf-conf-0.6.4-2.sdl7.noarch Loading mirror speeds from cached hostfile * base: ftp.nara.wide.ad.jp * epel: mirror.dmmlabs.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp ---> Package python-dnf.noarch 0:0.6.4-2.sdl7 will be installed --> Processing Dependency: python-hawkey >= 0.5.3 for package: python-dnf-0.6.4-2.sdl7.noarch --> Processing Dependency: python-libcomps >= 0.1.6 for package: python-dnf-0.6.4-2.sdl7.noarch --> Processing Dependency: python-librepo >= 1.7.5 for package: python-dnf-0.6.4-2.sdl7.noarch --> Processing Dependency: deltarpm for package: python-dnf-0.6.4-2.sdl7.noarch --> Running transaction check ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed ---> Package libreport-filesystem.x86_64 0:2.1.11-38.el7.centos will be installed ---> Package python-librepo.x86_64 0:1.7.16-1.el7 will be installed --> Processing Dependency: librepo(x86-64) = 1.7.16-1.el7 for package: python-librepo-1.7.16-1.el7.x86_64 --> Processing Dependency: librepo.so.0()(64bit) for package: python-librepo-1.7.16-1.el7.x86_64 ---> Package python2-hawkey.x86_64 0:0.6.3-4.el7 will be installed --> Processing Dependency: hawkey(x86-64) = 0.6.3-4.el7 for package: python2-hawkey-0.6.3-4.el7.x86_64 --> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64 --> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64 --> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64 --> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64 --> Processing Dependency: libhawkey.so.2()(64bit) for package: python2-hawkey-0.6.3-4.el7.x86_64 ---> Package python2-libcomps.x86_64 0:0.1.8-3.el7 will be installed --> Processing Dependency: libcomps(x86-64) = 0.1.8-3.el7 for package: python2-libcomps-0.1.8-3.el7.x86_64 --> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-3.el7.x86_64 --> Running transaction check ---> Package hawkey.x86_64 0:0.6.3-4.el7 will be installed ---> Package libcomps.x86_64 0:0.1.8-3.el7 will be installed ---> Package librepo.x86_64 0:1.7.16-1.el7 will be installed ---> Package libsolv.x86_64 0:0.6.26-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================== Package Arch Version Repository Size ============================================================================================================== Installing: dnf noarch 0.6.4-2.sdl7 /dnf-0.6.4-2.sdl7.noarch 652 k dnf-conf noarch 0.6.4-2.sdl7 /dnf-conf-0.6.4-2.sdl7.noarch 29 k python-dnf noarch 0.6.4-2.sdl7 /python-dnf-0.6.4-2.sdl7.noarch 1.8 M Installing for dependencies: deltarpm x86_64 3.6-3.el7 base 82 k hawkey x86_64 0.6.3-4.el7 base 89 k libcomps x86_64 0.1.8-3.el7 epel 74 k librepo x86_64 1.7.16-1.el7 base 77 k libreport-filesystem x86_64 2.1.11-38.el7.centos base 39 k libsolv x86_64 0.6.26-1.el7 base 323 k python-librepo x86_64 1.7.16-1.el7 base 49 k python2-hawkey x86_64 0.6.3-4.el7 base 73 k python2-libcomps x86_64 0.1.8-3.el7 epel 46 k Transaction Summary ============================================================================================================== Install 3 Packages (+9 Dependent packages) Total size: 3.3 M Total download size: 851 k Installed size: 4.3 M Is this ok [y/d/N]: y Downloading packages: (1/9): deltarpm-3.6-3.el7.x86_64.rpm | 82 kB 00:00:00 (2/9): libreport-filesystem-2.1.11-38.el7.centos.x86_64.rpm | 39 kB 00:00:00 (3/9): hawkey-0.6.3-4.el7.x86_64.rpm | 89 kB 00:00:00 (4/9): libcomps-0.1.8-3.el7.x86_64.rpm | 74 kB 00:00:00 (5/9): python-librepo-1.7.16-1.el7.x86_64.rpm | 49 kB 00:00:00 (6/9): python2-libcomps-0.1.8-3.el7.x86_64.rpm | 46 kB 00:00:00 (7/9): python2-hawkey-0.6.3-4.el7.x86_64.rpm | 73 kB 00:00:00 (8/9): libsolv-0.6.26-1.el7.x86_64.rpm | 323 kB 00:00:00 (9/9): librepo-1.7.16-1.el7.x86_64.rpm | 77 kB 00:00:00 -------------------------------------------------------------------------------------------------------------- Total 2.3 MB/s | 851 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : libsolv-0.6.26-1.el7.x86_64 1/12 Installing : hawkey-0.6.3-4.el7.x86_64 2/12 Installing : python2-hawkey-0.6.3-4.el7.x86_64 3/12 Installing : deltarpm-3.6-3.el7.x86_64 4/12 Installing : libcomps-0.1.8-3.el7.x86_64 5/12 Installing : python2-libcomps-0.1.8-3.el7.x86_64 6/12 Installing : libreport-filesystem-2.1.11-38.el7.centos.x86_64 7/12 Installing : dnf-conf-0.6.4-2.sdl7.noarch 8/12 Installing : librepo-1.7.16-1.el7.x86_64 9/12 Installing : python-librepo-1.7.16-1.el7.x86_64 10/12 Installing : python-dnf-0.6.4-2.sdl7.noarch 11/12 Installing : dnf-0.6.4-2.sdl7.noarch 12/12 Verifying : libsolv-0.6.26-1.el7.x86_64 1/12 Verifying : python2-libcomps-0.1.8-3.el7.x86_64 2/12 Verifying : librepo-1.7.16-1.el7.x86_64 3/12 Verifying : dnf-conf-0.6.4-2.sdl7.noarch 4/12 Verifying : libreport-filesystem-2.1.11-38.el7.centos.x86_64 5/12 Verifying : python-dnf-0.6.4-2.sdl7.noarch 6/12 Verifying : libcomps-0.1.8-3.el7.x86_64 7/12 Verifying : python2-hawkey-0.6.3-4.el7.x86_64 8/12 Verifying : python-librepo-1.7.16-1.el7.x86_64 9/12 Verifying : deltarpm-3.6-3.el7.x86_64 10/12 Verifying : hawkey-0.6.3-4.el7.x86_64 11/12 Verifying : dnf-0.6.4-2.sdl7.noarch 12/12 Installed: dnf.noarch 0:0.6.4-2.sdl7 dnf-conf.noarch 0:0.6.4-2.sdl7 python-dnf.noarch 0:0.6.4-2.sdl7 Dependency Installed: deltarpm.x86_64 0:3.6-3.el7 hawkey.x86_64 0:0.6.3-4.el7 libcomps.x86_64 0:0.1.8-3.el7 librepo.x86_64 0:1.7.16-1.el7 libreport-filesystem.x86_64 0:2.1.11-38.el7.centos libsolv.x86_64 0:0.6.26-1.el7 python-librepo.x86_64 0:1.7.16-1.el7 python2-hawkey.x86_64 0:0.6.3-4.el7 python2-libcomps.x86_64 0:0.1.8-3.el7 Complete! # dnf --version 0.6.4 Installed: dnf-0:0.6.4-2.sdl7.noarch at 2017-12-10 05:15 Built : at 2016-10-09 17:18 Installed: rpm-0:4.11.3-25.el7.x86_64 at 2017-09-21 12:42 Built : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-03 03:48 |
Help
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# dnf -h usage: dnf [options] COMMAND List of Main Commands autoremove check-update Check for available package upgrades clean Remove cached data distro-sync Synchronize installed packages to the latest available versions downgrade downgrade a package group Display, or use, the groups information help Display a helpful usage message history Display, or use, the transaction history info Display details about a package or group of packages install Install a package or packages on your system list List a package or groups of packages makecache Generate the metadata cache provides Find what package provides the given value reinstall reinstall a package remove Remove a package or packages from your system repolist Display the configured software repositories repository-packages Run commands on top of all packages in given repository search Search package details for the given string updateinfo Display advisories about packages upgrade Upgrade a package or packages on your system upgrade-to Upgrade a package on your system to the specified version optional arguments: --allowerasing allow erasing of installed packages to resolve dependencies -b, --best try the best available package versions in transactions. -C, --cacheonly run entirely from system cache, don't update cache -c [config file], --config [config file] config file location -d [debug level], --debuglevel [debug level] debugging output level --debugsolver dumps detailed solving results into files --showduplicates show duplicates, in repos, in list/search commands -e ERRORLEVEL, --errorlevel ERRORLEVEL error output level --rpmverbosity [debug level name] debugging output level for rpm -q, --quiet quiet operation -v, --verbose verbose operation -y, --assumeyes answer yes for all questions --assumeno answer no for all questions --version show DNF version and exit --installroot [path] set install root --enablerepo [repo] --disablerepo [repo] -x [package], --exclude [package] exclude packages by name or glob --disableexcludes [repo] disable excludes --obsoletes enable obsoletes processing during upgrades --noplugins disable all plugins --nogpgcheck disable gpg signature checking --disableplugin [plugin] disable plugins by name --color COLOR control whether color is used --releasever RELEASEVER override the value of $releasever in config and repo files --setopt SETOPTS set arbitrary config and repo options --refresh -4 resolve to IPv4 addresses only -6 resolve to IPv6 addresses only -h, --help show help |
man
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
DNF(8) DNF DNF(8) NAME dnf - DNF Command Reference SYNOPSIS dnf [options] <command> [<args>...] DESCRIPTION DNF is the next upcoming major version of Yum, a package manager for RPM-based Linux distributions. It roughly maintains CLI compatibility with Yum and defines strict API for extensions and plugins. Plugins can modify or extend features of DNF or provide additional CLI commands on top of those men- tioned below. Available commands are: o autoremove o check-update o clean o distro-sync o downgrade o group o help o history o info o install o list o makecache o provides o reinstall o remove o repolist o repository-packages o search o updateinfo o upgrade o upgrade-to See the reference for each command below. OPTIONS -4 Resolve to IPv4 addresses only. -6 Resolve to IPv6 addresses only. --allowerasing Allow erasing of installed packages to resolve dependencies. This option could be used as an alternative to yum swap command where packages to remove are not explicitly defined. --assumeno answer no for all questions --best Try the best available package versions in transactions. Specifically during dnf upgrade, which by default skips over updates that can not be installed for dependency reasons, the switch forces DNF to only consider the latest packages and possibly fail giving a reason why the latest version can not be installed. -C, --cacheonly Run entirely from system cache, don't update the cache and use it even in case it is expired. DNF uses a separate cache for each user under which it executes. The cache for the root user is called the system cache. This switch allows a regular user read-only access to the system cache which usually is more fresh then the user's and thus he does not have to wait for meta- data sync. -c <config file>, --config=<config file> config file location -d <debug level>, --debuglevel=<debug level> Debugging output level. This is an integer value between 0 (no additional information strings) and 10 (shows all debugging information, even that not understandable to the user), default is 2. Deprecated, use -v instead. --debugsolver Dump data aiding in dependency solver debugging into ./debugdata. --disableexcludes=[all|main|<repoid>] Disable the config file excludes. Takes one of three options: o all, disables all config file excludes o main, disables excludes defined in the [main] section o repoid, disables excludes defined for the given repo --disableplugin=<plugin names> Disable the listed plugins specified by names or globs. --disablerepo=<repoid> Disable specific repositories by an id or a glob. -e <error level>, --errorlevel=<error level> Error output level. This is an integer value between 0 (no error output) and 10 (shows all error messages), default is 2. Deprecated, use -v instead. --enablerepo=<repoid> Enable specific repositories by an id or a glob. -x <package-spec>, --exclude=<package-spec> Exclude packages specified by <package-spec> from the operation. -h, --help Show the help. --installroot=<path> set install root --refresh set metadata as expired before running the command --nogpgcheck skip checking GPG signatures on packages --noplugins Disable all plugins. -q, --quiet quiet operation -R <minutes>, --randomwait=<minutes> maximum command wait time --releasever=<release> configure DNF as if the distribution release was <release>. This can affect cache paths, val- ues in configuration files and mirrorlist URLs. Using '/' for this value makes DNF detect the release number from the running system. --rpmverbosity=<debug level name> debugging output level for rpm --setopt=<option>=<value> override a config option from the config file. To override config options from repo files, use repoid.option for the <option>. --showduplicates show duplicates, in repos, in list/search commands -v, --verbose verbose operation, show debug messages. --version show DNF version and exit -y, --assumeyes answer yes for all questions List options are comma separated. Command-line options override respective settings from configura- tion files. COMMANDS For an explanation of <package-spec> and <package-name-spec> see Specifying Packages. For an explanation of <package-nevr-spec> see Specifying Exact Versions of Packages. For an explanation of <provide-spec> see Specifying Provides. For an explanation of <group-spec> see Specifying Groups. For an explanation of <transaction-spec> see Specifying Transactions. Auto Remove Command dnf [options] autoremove Removes all "leaf" packages from the system that were originally installed as dependencies of user-installed packages but which are no longer required by any such package. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Check Update Command dnf [options] check-update [<package-specs>...] Non-interactively checks if updates of the specified packages are available. If no <pack- age-specs> are given checks whether any updates at all are available for your system. DNF exit code will be 100 when there are updates available and a list of the updates will be printed, 0 if not and 1 if an error occurs. Please note that having a specific newer version available for an installed package (and reported by check-update) does not imply that subsequent dnf upgrade will install it. The difference is that dnf upgrade must also ensure the satisfiability of all dependencies and other restrictions. Clean Command Performs cleanup of temporary files for the currently enabled repositories. dnf clean dbcache Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run. dnf clean expire-cache Removes local cookie files saying when the metadata and mirrorlists were downloaded for each repo. DNF will re-validate the cache for each repo the next time it is used. dnf clean metadata Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this option will make DNF download all the metadata the next time it is run. dnf clean packages Removes any cached packages from the system. dnf clean plugins Tells all enabled plugins to eliminate their cached data. dnf clean all Does all of the above. Distro-sync command dnf distro-sync [<package-spec>...] As necessary upgrades, downgrades or keeps selected installed packages to match the latest version available from any enabled repository. If no package is given, all installed packages are considered. Distribution-synchronization command dnf distribution-synchronization Deprecated alias for the Distro-sync command. Downgrade Command dnf [options] downgrade <package-specs>... Downgrades the specified packages to the highest of all known lower versions. Erase Command dnf [options] erase <spec>... Deprecated alias for the Remove Command. Group Command Groups are virtual collections of packages. DNF keeps track of groups that the user selected ("marked") installed and can manipulate the comprising packages with simple commands. dnf [options] group [summary] <group-spec> Display overview of how many groups are installed and available. With a spec, limit the out- put to the matching groups. summary is the default groups subcommand. dnf [options] group info <group-spec> Display package lists of a group. Shows which packages are installed or available from a repo when -v is used. dnf [options] group install [with-optional] <group-spec>... Mark the specified group installed and install packages it contains. Also include optional packages of the group if with-optional is specified. dnf [options] group list <group-spec>... List all matching groups, either among installed or available groups. If nothing is specified list all known groups. Records are ordered by display_order tag defined in comps.xml file. dnf [options] group remove <group-spec>... Mark the group removed and remove those packages in the group from the system which are nei- ther comprising another installed group and were not installed explicitly by the user. dnf [options] group upgrade <group-spec>... Upgrades the packages from the group and upgrades the group itself. The latter comprises of installing pacakges that were added to the group by the distribution and removing packages that got removed from the group as far as they were not installed explicitly by the user. Groups can be also be marked installed or removed without physically manipualting any packages: dnf [options] group mark install <group-spec>... Mark the specified group installed. No packages will be installed by this command but the group is then considered installed. dnf [options] group mark remove <group-spec>... Mark the specified group removed. No packages will be removed by this command. Help Command dnf help [<command>] Displays the help text for all commands. If given a command name then only displays the help for that particular command. History Command The history command allows the user to view what has happened in past transactions and act according to this information (assuming the history_record configuration option is set). dnf history [list] The default history action is listing all known transaction information in a table. dnf history info [<spec>...] Describe the given transactions. Each <spec> can be either a <transaction-spec>, which speci- fies a transaction directly, or a <package-name-spec>, which specifies a transaction by a package which it manipulated. When no transaction is specified describe what happened during the latest transaction. dnf history redo <transaction-spec> Repeat the specified transaction. If it is not possible to redo any operation due to the cur- rent state of RPMDB, do not redo any operation. dnf history rollback <transaction-spec> Undo all transactions performed after the specified transaction. If it is not possible to undo any transaction due to the current state of RPMDB, do not undo any transaction. dnf history undo <transaction-spec> Perform the opposite operation to all operations performed in the specified transaction. If it is not possible to undo any operation due to the current state of RPMDB, do not undo any operation. dnf history userinstalled List names of all packages installed by a user. The output can be used as the %packages sec- tion in a kickstart file. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Info Command dnf [options] info [<package-spec>...] Is used to list description and summary information about available packages. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Install Command dnf [options] install <spec>... Make sure that the given packages and their dependencies are installed on the system. Each <spec> can be either a <package-spec>, which specifies a package directly, or a path to the local rpm package, or an URL to a remote rpm package, or a @<group-spec>, which specifies an (environment) group which contains it. If a given package cannot be (and is not already) installed, the exit code will be non-zero. Please make sure that you understand which package will be selected in case of multiple matches (see Specifying Packages). List Command Dumps lists of packages depending on the packages' relation to the system. Generally packages are available (it is present in a repository we know about) or installed (present in the RPMDB). The list command can also limit the displayed packages according to other criteria, e.g. to only those that update an installed package. All the forms take a [<package-specs>...] parameter to further limit the result to only those pack- ages matching it. dnf [options] list [all] [<package-name-specs>...] Lists all packages known to us, present in the RPMDB, in a repo or in both. dnf [options] list installed [<package-name-specs>...] Lists installed packages. dnf [options] list available [<package-name-specs>...] Lists available packages. dnf [options] list extras [<package-name-specs>...] Lists extras, that is packages installed on the system that are not available in any known repository. dnf [options] list obsoletes [<package-name-specs>...] List the packages installed on the system that are obsoleted by packages in any known reposi- tory. dnf [options] list recent [<package-name-specs>...] List packages recently added into the repositories. dnf [options] list upgrades [<package-name-specs>...] List upgrades available for the installed packages. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Makecache Command dnf [options] makecache Downloads and caches in binary format metadata for all known repos. Tries to avoid download- ing whenever possible (e.g. when the local metadata hasn't expired yet or when the metadata timestamp hasn't changed). dnf [options] makecache timer Like plain makecache but instructs DNF to be more resource-aware, meaning will not do any- thing if running on battery power and will terminate immediately if it's too soon after the last successful makecache run (see dnf.conf(8), metadata_timer_sync). Provides Command dnf [options] provides <provide-spec> Finds the packages providing the given <provide-spec>. This is useful when one knows a file- name and wants to find what package (installed or not) provides this file. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Reinstall Command dnf [options] reinstall <package-specs>... Installs the specified packages, fails if some of the packages are either not installed or not available (i.e. there is no repository where to download the same RPM). Remove Command dnf [options] remove <package-specs>... Removes the specified packages from the system along with any packages depending on the pack- ages being removed. Each <spec> can be either a <package-spec>, which specifies a package directly, or a @<group-spec>, which specifies an (environment) group which contains it. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed. Repolist Command dnf [options] repolist [enabled|disabled|all] Depending on the exact command, lists enabled, disabled or all known repositories. Lists all enabled repositories by default. Provides more detailed information when -v option is used. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Repository-Packages Command The repository-packages command allows the user to run commands on top of all packages in the repos- itory named <repoid>. However, any dependency resolution takes into account packages from all enabled repositories. Specifications <package-name-spec> and <package-spec> further limit the candi- dates to only those packages matching at least one of them. info subcommand lists description and summary information about packages depending on the packages' relation to the repository. list subcommand just dumps lists of that packages. dnf [options] repository-packages <repoid> check-update [<package-name-spec>...] Non-interactively checks if updates of the specified packages in the repository are avail- able. DNF exit code will be 100 when there are updates available and a list of the updates will be printed. dnf [options] repository-packages <repoid> info [all] [<package-name-spec>...] List all related packages. dnf [options] repository-packages <repoid> info installed [<package-name-spec>...] List packages installed from the repository. dnf [options] repository-packages <repoid> info available [<package-name-spec>...] List packages available in the repository. dnf [options] repository-packages <repoid> info extras [<package-name-specs>...] List packages installed from the repository that are not available in any repository. dnf [options] repository-packages <repoid> info obsoletes [<package-name-spec>...] List packages in the repository that obsolete packages installed on the system. dnf [options] repository-packages <repoid> info recent [<package-name-spec>...] List packages recently added into the repository. dnf [options] repository-packages <repoid> info upgrades [<package-name-spec>...] List packages in the repository that upgrade packages installed on the system. dnf [options] repository-packages <repoid> install [<package-spec>...] Install all packages in the repository. dnf [options] repository-packages <repoid> list [all] [<package-name-spec>...] List all related packages. dnf [options] repository-packages <repoid> list installed [<package-name-spec>...] List packages installed from the repository. dnf [options] repository-packages <repoid> list available [<package-name-spec>...] List packages available in the repository. dnf [options] repository-packages <repoid> list extras [<package-name-specs>...] List packages installed from the repository that are not available in any repository. dnf [options] repository-packages <repoid> list obsoletes [<package-name-spec>...] List packages in the repository that obsolete packages installed on the system. dnf [options] repository-packages <repoid> list recent [<package-name-spec>...] List packages recently added into the repository. dnf [options] repository-packages <repoid> list upgrades [<package-name-spec>...] List packages in the repository that upgrade packages installed on the system. dnf [options] repository-packages <repoid> move-to [<package-name-spec>...] Reinstall all those packages that are available in the repository. dnf [options] repository-packages <repoid> reinstall [<package-name-spec>...] Run reinstall-old subcommand. If it fails, run move-to subcommand. dnf [options] repository-packages <repoid> reinstall-old [<package-name-spec>...] Reinstall all those packages that were installed from the repository and simultaneously are available in the repository. dnf [options] repository-packages <repoid> remove [<package-name-spec>...] Remove all packages installed from the repository along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed. dnf [options] repository-packages <repoid> remove-or-distro-sync [<package-name-spec>...] Select all packages installed from the repository. Upgrade, downgrade or keep those of them that are available in another repositories to match the latest version available there and remove the others along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed. dnf [options] repository-packages <repoid> remove-or-reinstall [<package-name-spec>...] Select all packages installed from the repository. Reinstall those of them that are available in another repositories and remove the others along with any packages depending on the pack- ages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed. dnf [options] repository-packages <repoid> upgrade [<package-name-spec>...] Update all packages to the highest resolvable version available in the repository. dnf [options] repository-packages <repoid> upgrade-to <package-nevr-specs>... Update packages to the specified versions that are available in the repository. Search Command dnf [options] search [all] <keywords>... Search package metadata for the keywords. Keywords are matched as case-insensitive sub- strings, globbing is supported. By default the command will only look at package names and summaries, failing that (or whenever all was given as an argument) it will match against package descriptions and URLs. The result is sorted from the most relevant results to the least. This command by default does not force a sync of expired metadata. See also Metadata Synchroniza- tion. Update Command dnf [options] update Deprecated alias for the Upgrade Command. Updateinfo Command dnf [options] updateinfo [<output>] [<availability>] [<spec>...] Display information about update advisories. Depending on <output>, DNF displays just counts of advisory types (omitted or summary), list of advisories (list) or detailed information (info). When info with -v option is used, the information is even more detailed. <availability> specifies whether advisories about newer versions of installed packages (omit- ted or available), advisories about equal and older versions of installed packages (installed), advisories about newer versions of those installed packages for which a newer version is available (updates) or advisories about any versions of installed packages (all) are taken into account. Most of the time, available and updates displays the same output. The outputs differ only in the cases when an advisory refers to a newer version but there is no enabled repository which contains any newer version. If given and if neither ID, type (bugfix, enhancement, security/sec) nor a package name of an advisory does match <spec>, the advisory is not taken into account. The matching is case-sen- sitive and in the case of advisory IDs and package names, globbing is supported. Upgrade Command dnf [options] upgrade Updates each package to a highest version that is both available and resolvable. dnf [options] upgrade <package-specs>... Updates each specified package to the latest available version. Updates dependencies as nec- essary. Update-To Command dnf [options] update-to <package-nevr-specs>... Deprecated alias for the Upgrade-To Command. Upgrade-To Command dnf [options] upgrade-to <package-nevr-specs>... Upgrades packages to the specified versions. SPECIFYING PACKAGES Many commands take a <package-spec> parameter that selects a package for the operation. DNF looks for interpretations of the parameter from the most commonly used meanings to the least, that is it tries to see if the given spec fits one of the following patterns (in decreasing order of priority): o name.arch o name o name-[epoch:]version-release.arch o name-[epoch:]version-release o name-[epoch:]version Note that name can in general contain dashes (e.g. package-subpackage). Failing to match the input argument to an existing package name based on the patterns above, DNF tries to see if the argument matches an existing provide. By default, if multiple versions of the selected package exist in the repo, the most recent version suitable for the given operation is used. If the selected package exists for multiple architectures, the packages which best match the system's architecture will be preferred. The name specification is case-sensitive, globbing characters "?, * and [ are allowed and trigger shell-like glob matching. If globbing character is present in name, DNF expands given name first and consequently selects all packages matching expanded <package-spec>. <package-name-spec> is similar to <package-spec> except the provides matching is never attempted there. SPECIFYING EXACT VERSIONS OF PACKAGES Commands accepting the <package-nevr-spec> parameter need not only the name of the package, but also its version, release and optionally the architecture. Further, the version part can be preceded by an epoch when it is relevant (i.e. the epoch is non-zero). SPECIFYING PROVIDES <provide-spec> in command descriptions means the command operates on packages providing the given spec. This can either be an explicit provide, an implicit provide (i.e. name of the package) or a file provide. The selection is case-sensitive and globbing is supported. SPECIFYING GROUPS <group-spec> allows one to select (environment) groups a particular operation should work on. It is a case insensitive string (supporting globbing characters) that is matched against a group's ID, canonical name and name translated into the current LC_MESSAGES locale (if possible). SPECIFYING TRANSACTIONS <transaction-spec> can be in one of several forms. If it is an integer, it specifies a transaction ID. Specifying last is the same as specifying the ID of the most recent transaction. The last form is last-<offset>, where <offset> is a positive integer. It specifies offset-th transaction preceding the most recent transaction. METADATA SYNCHRONIZATION Correct operation of DNF depends on having access to up-to-date data from all enabled repositories but contacting remote mirrors on every operation considerably slows it down and costs bandwidth for both the client and the repository provider. The metadata_expire (see dnf.conf(8)) repo config option is used by DNF to determine whether particular local copy of repository data is due to be re-synced. It is crucial that the repository providers set the option well, namely to a value where it is guaranteed that if particular metadata was available in time T on the server, then all pack- ages it references will still be available for download from the server in time T + metadata_expire. To further reduce the bandwidth load, some of the commands where having up-to-date metadata is not critical (e.g. the list command) do not look at whether a repository is expired and whenever any version of it is locally available, it will be used. Note that in all situations the user can force synchronization of all enabled repositories with the --refresh switch. SEE ALSO o dnf.conf(8), DNF Configuration Reference o dnf.plugin.*(8), assorted DNF plugins that might be installed on the system. o DNF project homepage (https://github.com/rpm-software-management/dnf/) o Yum project homepage (http://yum.baseurl.org/) AUTHOR See AUTHORS in DNF source distribution. COPYRIGHT 2012-2014, Red Hat, Licensed under GPLv2+ 0.6.4 October 09, 2016 DNF(8) |