LoginSignup
15
16

More than 5 years have passed since last update.

Ubuntuでセキュリティアップデートのみ実行する

Last updated at Posted at 2018-05-18

なぜかunattended-upgradesでセキュリティアップデートできない場合は以下の手順でアップデートできます。

セキュリティアップデートのあるパッケージを特定

ubuntu@ip-10-1-0-7:~$ sudo apt upgrade -s |grep security
Inst libxslt1.1 (1.1.28-2.1ubuntu0.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf libxslt1.1 (1.1.28-2.1ubuntu0.1 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])

特定したパッケージのみアップデート

apt-get installを使う。

ubuntu@ip-10-1-0-7:~$ sudo apt-get install libxslt1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxslt1.1
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 145 kB of archives.
After this operation, 478 kB of additional disk space will be used.
Get:1 http://ap-northeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libxslt1.1 amd64 1.1.28-2.1ubuntu0.1 [145 kB]
Fetched 145 kB in 0s (899 kB/s)
Selecting previously unselected package libxslt1.1:amd64.
(Reading database ... 52139 files and directories currently installed.)
Preparing to unpack .../libxslt1.1_1.1.28-2.1ubuntu0.1_amd64.deb ...
Unpacking libxslt1.1:amd64 (1.1.28-2.1ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libxslt1.1:amd64 (1.1.28-2.1ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
ubuntu@ip-10-1-0-7:~$

セキュリティアップデートが完了したことを確認

ubuntu@ip-10-1-0-7:~$ sudo apt upgrade -s |grep security
ubuntu@ip-10-1-0-7:~$

おまけ:yumの場合

環境によりますがだいたい↓これでいけます。

 yum --security update
15
16
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
15
16