如何查看 apt 會更新哪些軟體包?

如何查看 apt 會更新哪些軟體包?

我在登入時在我的伺服器上看到有一些可用更新。

如何在不啟動更新的情況下查看伺服器上將更新哪些軟體包?

答案1

使用--dry-run, -s, --simulate, --just-print, --recon,--no-act參數,它實際上不會做任何事情,它只會告訴你它會做什麼:

從 apt-get 手冊頁

-s, --simulate, --just-print, --dry-run, --recon, --no-act
          No action; perform a simulation of events that would occur but do
          not actually change the system. Configuration Item:
          APT::Get::Simulate.

          Simulate prints out a series of lines each one representing a dpkg
          operation, Configure (Conf), Remove (Remv), Unpack (Inst). Square
          brackets indicate broken packages with and empty set of square
          brackets meaning breaks that are of no consequence (rare).

很容易看一下指令:

apt-get upgrade --dry-run

或者

apt-get upgrade -s

相關內容