2024/02/13 22:13:39

yum

RPMベースのパッケージ管理ツール

yum はシステムの更新を自動的に行える便利なツールです。 パッケージ単位の依存をよしなに解決しながらインストール/アンインストールしてくれてとても楽です。 apt-get などのパッケージ管理ツールと似たようなものです。 yum は PackageKit や the gnome-packagekit などの GUI ツールも存在します。

設定ファイル

/etc/yum.conf

$ man yum.conf

ログ

/var/log/yum.log

yum foo

install package1 [package2] [...]

yum のパッケージをインストールします。

update [package1] [package2] [...]

明示されたパッケージを更新します。パッケージを明示しなければ、インストールされているすべてのパッケージを更新します。

check-update

古くなったパッケージを確認することができます。

upgrade [package1] [package2] [...]

update --obsoletes [package1] [package2] [...] と同じ

remove | erase package1 [package2] [...]

パッケージを削除します

list [...]

インストールされているパッケージを一覧表示します。
引数にパッケージを渡すとパッケージを絞ることができます。

LIST OPTIONS

The following are the ways which you can invoke yum in list mode. Note that all list commands include information on the version of the package.

  • yum list [all | glob_exp1] [glob_exp2] [...]
    List all available and installed packages.
  • yum list available [glob_exp1] [...]
    List all packages in the yum repositories available to be installed.
  • yum list updates [glob_exp1] [...] List all packages with updates available in the yum repositories.
  • yum list installed [glob_exp1] [...] List the packages specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed.
  • yum list extras [glob_exp1] [...]
    List the packages installed on the system that are not available in any yum repository listed in the config file.
  • yum list obsoletes [glob_exp1] [...]
    List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file.
  • yum list recent List packages recently added into the repositories.
  • Specifying package names All the list options mentioned above take file-glob-syntax wild-cards or package names as arguments, for example yum list available 'foo*' will list all available packages that match 'foo*'. (The single quotes will keep your shell from expanding the globs.)

info [...]

インストールされているパッケージの詳細情報を表示します
引数にパッケージを渡すとパッケージを絞ることができます。

provides | whatprovides feature1 [feature2] [...]

clean [ packages | headers | metadata | dbcache | all ]

makecache

groupinstall group1 [group2] [...]

groupupdate group1 [group2] [...]

grouplist [hidden] [groupwildcard] [...]

groupremove group1 [group2] [...]

groupinfo group1 [...]

search string1 [string2] [...]

shell [filename]

resolvedep dep1 [dep2] [...]

localinstall rpmfile1 [rpmfile2] [...]

localupdate rpmfile1 [rpmfile2] [...]

reinstall package1 [package2] [...]

downgrade package1 [package2] [...]

deplist package1 [package2] [...]

repolist [all|enabled|disabled]

help [command]

GENERAL OPTIONS

Most command line options can be set using the configuration file as well and the descriptions indicate the necessary configuration option to set.

  • -h, --help
    Help; display a help message and then quit.
  • -y
    Assume yes; assume that the answer to any question which would be asked is yes. Configuration Option: assumeyes
  • -c [config file]
    Specifies the config file location - can take http, ftp urls and local file paths.
  • -q, --quiet
    Run without output. Note that you likely also want to use -y.
  • -v, --verbose
    Run with a lot of debugging output.
  • -d [number]
    Sets the debugging level to [number] - turns up or down the amount of things that are printed. Practical range: 0 - 10 Configuration Option: debuglevel
  • -e [number]
    Sets the error level to [number] Practical range 0 - 10. 0 means print only critical errors about which you must be told. 1 means print all errors, even ones that are not overly important. 1+ means print more errors (if any) -e 0 is good for cron jobs. Configuration Option: errorlevel
サイト内検索