Linux

有沒有辦法讓 apt-get upgrade 不顯示更改日誌?

  • February 28, 2017

我希望能夠編寫腳本apt-get upgrade以在沒有提示的情況下無縫執行,但在我的實驗中,我無法讓它停止顯示提示,即使使用-yor也是如此--force yes。最近,當從頭開始設置 RPis 時,這是一個範例違規者,我只需點擊q它即可繼續升級:

ca-certificates (20141019+deb8u2) stable; urgency=medium

 Update Mozilla certificate authority bundle to version 2.9.
   The following certificate authorities were added (+):
   + "Certplus Root CA G1"
   + "Certplus Root CA G2"
   + "Certum Trusted Network CA 2"
   + "Hellenic Academic and Research Institutions ECC RootCA 2015"
   + "Hellenic Academic and Research Institutions RootCA 2015"
   + "ISRG Root X1"
   + "OpenTrust Root CA G1"
   + "OpenTrust Root CA G2"
   + "OpenTrust Root CA G3"
   + "SZAFIR ROOT CA2"
   The following certificate authorities were removed (-):
   - "CA Disig"
   - "NetLock Business (Class B) Root"
   - "NetLock Express (Class C) Root"
   - "NetLock Notary (Class A) Root"
   - "NetLock Qualified (Class QA) Root"
   - "Sonera Class 1 Root CA"
   - "Staat der Nederlanden Root CA"
   - "Verisign Class 1 Public Primary Certification Authority - G2"
   - "Verisign Class 3 Public Primary Certification Authority"
   - "Verisign Class 3 Public Primary Certification Authority - G2"

-- Michael Shuler <michael@pbandjelly.org>  Fri, 18 Nov 2016 09:09:47 -0600

老實說,即使我手動執行程序,這也很煩人,因為它可能需要幾分鐘,我會走開,期待回到已完成的任務,卻發現它在中途暫停。

我看到了一些關於讓它更安靜的-qq東西,但我有點擔心它可能會覆蓋一個與預設值不同的 conf 文件(雖然很煩人,但我覺得這是可以接受的)。

所以,老實說,我什至不知道如何提出正確的問題——我只是希望這個提示消失。

您看到的輸出來自apt-listchanges包,這不是預設值。有多種方法可以防止更改暫停更新過程:

  1. 設置APT_LISTCHANGES_FRONTEND=cat在環境中
  2. 在部分下編輯/etc/apt/listchanges.conf和設置frontend=cat``apt
  3. 解除安裝apt-listchanges軟體包

引用自:https://serverfault.com/questions/835303