サーバーのよく使うコマンドメモ| dpkg

Summery
debパッケージのインストール(アンインストール)を行う
Debian系
Construction
1 |
$ dpkg [action] [option] [package] |
Option
[action]
-i : インストール
-r : アンインストール
-l : インストール済みパッケージのリスト表示
-L : インストール済みパッケージの一覧表示
-C : インストール完了していないパッケージの表示[option]
–largemem : メモリーを必要なだけ利用する
–smallmem : ーを節約する
–no-act : インストール,アンインストールなどを行わず確認のみを行う
-R : 再帰的にディレクトリを検索する
-E : 同バージョンのパッケージがインストール済みの場合は,再インストールしない
Sample
1 2 3 4 5 6 7 8 |
# .debパッケージをインストールする $ dpkg -i ***.deb # インストール済みのパッケージをアンインストールする $ dpkg -r *** # インストール済みのパッケージをすべて表示する $ dpkg -l |
Discription
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 |
使い方: dpkg [< オプション> ...] < コマンド> Commands: -i|--install < .deb file name> ... | -R|--recursive <directory> ... --unpack < .deb file name> ... | -R|--recursive </directory><directory> ... -A|--record-avail < .deb file name> ... | -R|--recursive </directory><directory> ... --configure <package> ... | -a|--pending --triggers-only </package><package> ... | -a|--pending -r|--remove </package><package> ... | -a|--pending -P|--purge </package><package> ... | -a|--pending -V|--verify </package><package> ... Verify the integrity of package(s). --get-selections [<pattern> ...] Get list of selections to stdout. --set-selections Set package selections from stdin. --clear-selections Deselect every non-essential package. --update-avail [<packages -file>] Replace available packages info. --merge-avail [</packages><packages -file>] Merge with info from file. --clear-avail Erase existing available info. --forget-old-unavail Forget uninstalled unavailable pkgs. -s|--status <package> ... Display package status details. -p|--print-avail </package><package> ... Display available version details. -L|--listfiles </package><package> ... List files `owned' by package(s). -l|--list [<pattern> ...] List packages concisely. -S|--search </pattern><pattern> ... Find package(s) owning file(s). -C|--audit Check for broken package(s). --add-architecture <arch> Add </arch><arch> to the list of architectures. --remove-architecture </arch><arch> Remove </arch><arch> from the list of architectures. --print-architecture Print dpkg architecture. --print-foreign-architectures Print allowed foreign architectures. --compare-versions <a> <op> <b> Compare version numbers - see below. --force-help Show help on forcing. -Dh|--debug=help Show help on debugging. -?, --help このヘルプを表示 --version バージョン番号を表示 アーカイブの操作には dpkg -b|--build|-c|--contents|-e|--control|-I|--info| -f|--field|-x|--extract|-X|--vextract|--fsys-tarfile を使用すること (dpkg-deb --help を参照) For internal use: dpkg --assert-support-predepends | --predep-package | --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep | --assert-multi-arch | --assert-versioned-provides. Options: --admindir=<directory> Use </directory><directory> instead of /var/lib/dpkg. --root=</directory><directory> Install on a different root directory. --instdir=</directory><directory> Change installation dir without changing admin dir. --path-exclude=<pattern> Do not install paths which match a shell pattern. --path-include=</pattern><pattern> Re-include a pattern after a previous exclusion. -O|--selected-only Skip packages not selected for install/upgrade. -E|--skip-same-version Skip packages whose same version is installed. -G|--refuse-downgrade Skip packages with earlier version than installed. -B|--auto-deconfigure Install even if it would break some other package. --[no-]triggers Skip or force consequential trigger processing. --verify-format=<format> Verify output format (supported: 'rpm'). --no-debsig Do not try to verify package signatures. --no-act|--dry-run|--simulate Just say what we would do - don't do it. -D|--debug=<octal> Enable debugging (see -Dhelp or --debug=help). --status-fd <n> Send status change updates to file descriptor </n><n>. --status-logger=<command /> Send status change updates to <command />'s stdin. --log=<filename> Log status changes and actions to </filename><filename>. --ignore-depends=<package>,... Ignore dependencies involving </package><package>. --force-... Override problems (see --force-help). --no-force-...|--refuse-... Stop when problems encountered. --abort-after <n> Abort after encountering </n><n> errors. --compare-versions 用比較演算子: lt le eq ne ge gt (バージョンなしはどのバージョンよりも古いと見なす) lt-nl le-nl ge-nl gt-nl (バージョンなしはどのバージョンよりも新しいと見なす) < << <= = >= >> > (コントロールファイルの構文の互換性のみ) ユーザ向けパッケージ管理ツールである `apt' または `aptitude' を使いましょう。 </n></package></filename></n></octal></format></pattern></directory></b></op></a></arch></pattern></package></packages></pattern></package></directory> |