아무것도 변경하지 않고 apt-get 업데이트 / 업그레이드 목록 싶지 않은 패키지가 있기 때문에 실제로

업데이트하고 싶지 않은 패키지가 있기 때문에 실제로 파일을 변경하지 않고 업데이트 / 업그레이드에 사용할 수있는 패키지를 확인하고 싶습니다. 그런 다음 예외를 제외하고 업데이트를받을 수 있습니까?



답변

사용 apt list --upgradable합니다.
다음 대안은 apt-get --simulate upgrade입니다. (@EightBitTony 기반)
다음은 다른 옵션의 결과입니다 (다른 사람을 돕기를 바랍니다).

me@machine:~$ apt list --upgradable
    Listing... Done
    kubernetes-cni/kubernetes-xenial 0.7.5-00 amd64 [upgradable from: 0.6.0-00]
    N: There are 3 additional versions. Please use the '-a' switch to see them.
me@machine:~$ apt-get --simulate upgrade
    NOTE: This is only a simulation!
          apt-get needs root privileges for real execution.
          Keep also in mind that locking is deactivated,
          so don't depend on the relevance to the real current situation!
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages will be upgraded:
      kubernetes-cni
    1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Inst kubernetes-cni [0.6.0-00] (0.7.5-00 kubernetes-xenial:kubernetes-xenial [amd64])
    Conf kubernetes-cni (0.7.5-00 kubernetes-xenial:kubernetes-xenial [amd64])
me@machine:~$ apt-get -u upgrade --assume-no
    E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
me@machine:~$ sudo apt-get -u upgrade --assume-no
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages will be upgraded:
      kubernetes-cni
    1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6,473 kB of archives.
    After this operation, 4,278 kB of additional disk space will be used.
    Do you want to continue? [Y/n] N
    Abort.
me@machine:~$ sudo apt-get -u -V upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages will be upgraded:
       kubernetes-cni (0.6.0-00 => 0.7.5-00)
    1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 6,473 kB of archives.
    After this operation, 4,278 kB of additional disk space will be used.
    Do you want to continue? [Y/n] n
    Abort.


답변

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.

       Simulation run as user will deactivate locking (Debug::NoLocking)
       automatic. Also a notice will be displayed indicating that this
       is only a simulation, if the option APT::Get::Show-User-Simulation-Note
       is set (Default: true). Neither NoLocking nor the notice will be
       triggered if run as root (root should know what he is doing without
       further warnings by apt-get).

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

그래서 당신을 확인하십시오 apt-get -s upgrade.

특정 패키지를 업그레이드하려는 apt-get install <package name>경우 이미 설치되어 있으면 업데이트됩니다. 그러나 또한 모든 종속성을 업데이트해야하며, 종속 항목이 무엇인지에 따라 많은 업데이트에 종속 될 수 있습니다.

패키지 업데이트가 뒤처진 경우 apt-get install큰 것들 (php, apache2 등) 중 일부를 수행하여 포함 된 상태를 유지하고 문제를 확인할 수 있습니다 apt-get upgrade.


답변

해당 버전으로 업그레이드 할 패키지를 나열하려면

$ sudo apt-get -u -V upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
   mysql-client-5.5 (5.5.29-0ubuntu0.12.04.2 => 5.5.32-0ubuntu0.12.04.1)
   mysql-server-5.5 (5.5.29-0ubuntu0.12.04.2 => 5.5.32-0ubuntu0.12.04.1)
   mysql-server-core-5.5 (5.5.29-0ubuntu0.12.04.2 => 5.5.32-0ubuntu0.12.04.1)
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

그런 다음 업그레이드 할 항목을 선택할있습니다 .

$ sudo apt-get --only-upgrade install mysql-client-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
firefox-globalmenu
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libterm-readkey-perl
The following NEW packages will be installed:
libterm-readkey-perl
The following packages will be upgraded:
mysql-client-5.5
1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 8,123 kB of archives.
After this operation, 139 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libterm-readkey-perl i386 2.30-4build3 [28.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-5.5 i386 5.5.32-0ubuntu0.12.04.1 [8,094 kB]
...

이전 종속성이 제거 된 경우을 실행 apt-get autoremove하면 새 종속성을 설치하라는 메시지가 표시됩니다. --only-upgrade, 즉 당신이 그 순간 중 하나가 실수로 잘못된 패키지를 입력 플래그가 필요하지 않습니다,하지만 당신은 당신이 실수로 기존의 것을 업그레이드하는 대신 새 패키지를 설치하지 않도록하려면 좋은 경우 :

$ sudo apt-get --only-upgrade install mysql-proxy
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping mysql-proxy, it is not installed and only upgrades are requested.
The following package was automatically installed and is no longer required:
firefox-globalmenu
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.


답변

apt-get -s upgrade시뮬레이션 만하는 문제를 해결 하는 데 도움이됩니까 ? 그런 다음 원하는 각 패키지를로 업데이트 할 수 있습니다 apt-get install <thepackage>.

멋진 CLI GUI로 대화 형을 원한다면을 사용하십시오 aptitude. 아직 설치되지 않은 경우로 설치하십시오 apt-get install aptitude.


답변