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 I rolled back the edit because I really meant opkg (see 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 4:39

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

# apt-get -u upgrade

From the apt-get manpage:

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]
| improve this answer | |
  • So , apt-get -u dist-upgrade – PersianGulf Sep 21 '14 at 21:44
  • @MohsenPahlevanzadeh that does more than upgrading package. It removes and install packages. – Braiam Sep 21 '14 at 21:52
  • a better solution without command: apt-get dist-upgarde > myout.txt – PersianGulf Sep 21 '14 at 22:46
  • Doesn't this actually do more than the OP was asking for? He just wanted the list. This will list them AND actually do the upgrade (I believe). – Travis Griggs Jun 12 '18 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.