2

After I run apt-get update, I would like to get a list of all packages that can be upgraded.
With opkg I usually to this::

opkg list_upgradable

How can I do this with APT?

agc
  • 7,045
  • 3
  • 23
  • 53
reg
  • 1,113
  • 1
  • 8
  • 12
  • @agc I rolled back the edit because I really meant opkg (see https://en.wikipedia.org/wiki/Opkg) not dpkg. This command wouldn't work with dpkg. – reg Jul 25 '16 at 16:37
  • thanks for the correction, sorry, I'd no clue... – agc Jul 26 '16 at 04:39

1 Answers1

4

The -u switch shows a list of packages that are available for upgrade:

# apt-get -u upgrade

From the apt-get manpage:

-u
--show-upgraded
Show upgraded packages; Print out a list of all packages that are to be upgraded. Configuration Item: APT::Get::Show-Upgraded.

You will also be prompted before anything is updated. For example:

 # apt-get -u upgrade
 Reading Package Lists... Done
 Building Dependency Tree... Done
 The following packages have been kept back
   cpp gcc lilo 
 The following packages will be upgraded
   adduser ae apt autoconf debhelper dpkg-dev esound esound-common ftp indent
   ipchains isapnptools libaudiofile-dev libaudiofile0 libesd0 libesd0-dev
   libgtk1.2 libgtk1.2-dev liblockfile1 libnewt0 liborbit-dev liborbit0
   libstdc++2.10-glibc2.2 libtiff3g libtiff3g-dev modconf orbit procps psmisc 
 29 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
 Need to get 5055B/5055kB of archives. After unpacking 1161kB will be used.
 Do you want to continue? [Y/n]
HalosGhost
  • 4,732
  • 10
  • 33
  • 41
Jan
  • 7,600
  • 2
  • 34
  • 41