Skip to content

Instantly share code, notes, and snippets.

@minazou67
Last active December 6, 2015 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minazou67/a9e282abf16a7cd81bcc to your computer and use it in GitHub Desktop.
Save minazou67/a9e282abf16a7cd81bcc to your computer and use it in GitHub Desktop.
How to upgrade debian package

How to upgrade debian package

Debian のパッケージをアップグレードする方法です。

Preparation

必要に応じてバックアップを取得します。仮想環境の場合は、仮想イメージのエクスポートでOK。

Update package management site

パッケージ管理サイトのリストを確認し、必要に応じて更新します。

# cat /etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 NETINST Binary-1 20150606-14:16]/ jessie main
#

deb http://ftp.jp.debian.org/debian/ jessie main
deb-src http://ftp.jp.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.jp.debian.org/debian/ jessie-updates main
deb-src http://ftp.jp.debian.org/debian/ jessie-updates main

Update Packages or distribution

パッケージ又はディストリビューションを更新します。

# sudo apt-get update
# sudo apt-get upgrade
# sudo apt-get dist-upgrade

Confirmation of version and system information

OS のバージョン及びシステム情報を確認します。

# cat /etc/debian_version
8.2
# uname -a
Linux example 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

Remove unnecessary packages

依存関係を調べて不要なパッケージを自動削除します。

# sudo apt-get autoremove
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 0 個。

Erase downloaded archive files

インストールに使用したアーカイブファイルを削除します。

# sudo apt-get clean

Post-processing

OS を再起動します。

# sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment