Apt-get dist-upgrade -y と apt-get upgrade の比較

Apt-get dist-upgrade -y と apt-get upgrade の比較

私はこれについて何度も考えてきましたが、まだどこにも答えが見つかりません。いくつかのソースがアップグレード コマンドの後に -y を挿入する理由を説明できる人はいますか? これはどのような機能ですか。

答え1

  • apt-get updateリポジトリからパッケージ リストをダウンロードし、それを「更新」して、パッケージの最新バージョンとその依存関係に関する情報を取得します。これは、すべてのリポジトリと PPA に対して実行されます。

    からapt-get は、以下の URL からダウンロードできます。

              Used to re-synchronize the package index files from their sources. 
              The indexes of available packages are fetched from the location(s) 
              specified in /etc/apt/sources.list(5). An update should always be 
              performed before an upgrade or dist-upgrade.
    
  • apt-get upgradeAPT が apt-get update を通じてこれらの新しいバージョンを認識している場合、マシン上に存在するパッケージの新しいバージョンを取得します。

    からapt-get は、以下の URL からダウンロードできます。

              Used to install the newest versions of all packages currently
              installed on the system from the sources enumerated in 
              /etc/apt/sources.list(5). Packages currently installed with new 
              versions available are retrieved and upgraded; under no 
              circumstances are currently installed packages removed, nor
              are packages that are not already installed retrieved and 
              installed. New versions of currently installed packages that 
              cannot be upgraded without changing the install status of another 
              package will be left at their current version. An update must be 
              performed first so that apt-get knows that new versions of 
              packages are available. 
    
  • -y, --yes, --assume-yes

              Automatic yes to prompts; assume "yes" as answer to all prompts and
              run non-interactively. If an undesirable situation, such as
              changing a held package, trying to install a unauthenticated
              package or removing an essential package occurs then apt-get will
              abort. Configuration Item: APT::Get::Assume-Yes.  
    

    apt-getwithオプションを使用しないことを選択した場合は-y、コマンドの実行を続行するために、そのコマンドから対話的に取得されるすべてのプロンプトに応答する必要があります。

関連情報