LoginSignup
15

More than 5 years have passed since last update.

aptコマンド(14.04以降。apt-get,apt-cache代替)

Last updated at Posted at 2014-07-15

14.04以降は最初から入っています。
それより前だとapt-get install -y aptで入ると思う。

apt tag:ubuntuで検索して書いている人いなさそうだったので。

# apt
apt 1.0.1ubuntu2 for amd64 コンパイル日時: Apr 10 2014 13:03:39
使用法: apt [オプション] コマンド

apt 用コマンドラインインターフェイス
基本コマンド:
 list   - パッケージ名を基にパッケージの一覧を表示
 search - パッケージの説明を検索
 show   - パッケージの詳細を表示

 update - 利用可能パッケージの一覧を更新

 install - パッケージをインストール
 remove  - パッケージを削除

 upgrade - パッケージをインストール/更新してシステムをアップグレード
 full-upgrade - パッケージを削除/インストール/更新してシステムをアップグレード

 edit-sources - ソース情報ファイルを編集
# apt list
一覧表示...
0ad/trusty 0.0.15+dfsg-3 amd64
0ad-data/trusty 0.0.15-1 all
0ad-data-common/trusty 0.0.15-1 all
0ad-dbg/trusty 0.0.15+dfsg-3 amd64
0xffff/trusty 0.6~git20130406-1 amd64
2ping/trusty 2.0-1 all
2vcard/trusty 0.5-3 all
3270-common/trusty 3.3.10ga4-2build2 amd64
389-admin/trusty 1.1.35-0ubuntu1 amd64
...
# apt update
無視 http://jp.archive.ubuntu.com trusty InRelease
無視 http://jp.archive.ubuntu.com trusty-updates InRelease
無視 http://jp.archive.ubuntu.com trusty-backports InRelease
無視 http://security.ubuntu.com trusty-security InRelease
ヒット http://jp.archive.ubuntu.com trusty Release.gpg
取得:1 http://jp.archive.ubuntu.com trusty-updates Release.gpg [933 B]
取得:2 http://jp.archive.ubuntu.com trusty-backports Release.gpg [933 B]
ヒット http://jp.archive.ubuntu.com trusty Release
ヒット http://security.ubuntu.com trusty-security Release.gpg
...
# apt remove vim-tiny
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下のパッケージは「削除」されます:
  ubuntu-minimal vim-tiny
アップグレード: 0 個、新規インストール: 0 個、削除: 2 個、保留: 176 個。
この操作後に 1,015 kB のディスク容量が解放されます。
続行しますか? [Y/n]

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15