1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntuのパッケージアップデート数の確認

Last updated at Posted at 2019-01-29
メッセージの取得
$ sudo /etc/update-motd.d/90-updates-available 

16 個のパッケージがアップデート可能です。
10 個のアップデートはセキュリティアップデートです。

$ sudo cat /var/lib/update-notifier/updates-available

16 個のパッケージがアップデート可能です。
10 個のアップデートはセキュリティアップデートです。

$ /usr/lib/update-notifier/apt-check --human-readable
16 個のパッケージがアップデート可能です。
10 個のアップデートはセキュリティアップデートです。
数の取得(出力先はstderr)
$ /usr/lib/update-notifier/apt-check
16;10$ 

ちなみにリブートが必要かどうか.

要リブート?
$ /etc/update-motd.d/98-reboot-required
*** システムの再起動が必要です ***
$ /usr/lib/update-notifier/update-motd-reboot-required
*** システムの再起動が必要です ***
$ cat /var/run/reboot-required
*** システムの再起動が必要です ***
1
5
0

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
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?