View available security updates in ubuntu.

You can view the number of security updates in ubuntu by using the command

/usr/lib/update-notifier/apt-check --human-readable

If you want to see the what all packages are getting security updates, modify the script /usr/lib/update-notifier/apt-check

Before modifying take a backup of the script.

vi /usr/lib/update-notifier/apt-check

Locate the line if isSecurityUpgrade(cand_ver):
. Locate security_updates += 1 under the if condition and enter the following line

print('%s' % cand_ver)

After editing the if condition snippet will look like this.

if isSecurityUpgrade(cand_ver):
  upgrades += 1
  security_updates += 1
  print('%s' % cand_ver)

Execute the below command to get package names.

/usr/lib/update-notifier/apt-check | awk '{print $3}'

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s