Technical Anshu
Tutorials Blog
🐧 Ubuntu アップグレード ガイド

apt Update Works 後、Ubuntu を段階的に安全にアップグレードする

Fixing the update was the diagnosis;これが治療法です。クリーンな apt アップデートではカタログが更新されただけです。実際のアップグレードはまだ待機しているため、同じ注意が必要です。最初に見て、概要を読み、それからインストールします。

✍️ Technical Anshu🐧 Ubuntu / Linux⏱️ 6 minute read
🎥完全なビデオをご覧ください - apt-get update 修正がライブで段階的に示されています

The errors are gone and apt update ends the way it should - quietly. Many people stop here, which means their machine has a perfect catalogue of updates it has never installed.このシリーズの最後のページでは、保留リストを確認し、apt の指示を読みながらアップグレードを実行し、キープバックされたパッケージを処理して再起動し、エラーとアップグレードの山が再び形成されないようにする毎週の小さな習慣を設定する方法について説明します。

Terminal - the safe order, update first then upgrade
$ sudo apt update Reading package lists... Done 12 packages can be upgraded. Run 'apt list --upgradable' to see them. $ sudo apt upgrade The following packages will be upgraded: firefox openssl curl ... 12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
クリーンな更新終了 (E: 行がない) は青信号です。その後初めてアップグレードが開始されます。表示されているパッケージ名と数は例です。
1

Update and Upgrade Are Two Different Jobs

Now that sudo apt update runs cleanly, be clear about what it did: it refreshed the catalogue - the lists of what versions exist. It did not change a single program on your PC. sudo apt upgrade is the step that downloads and installs those newer versions.古いリストに基づいてアップグレードを実行すると、新しいものを何もインストールせずに何ヶ月も「更新」することになるため、このペアは常に一緒に移動し、最初に更新し、次にアップグレードを同じ席で行います。

2

Look Before You Leap - Review the List

  1. See exactly what is waiting: apt list --upgradable. A short list is a routine day; a list of hundreds means the machine has been unpatched for a long time.
  2. sudo apt upgrade を実行し、Y を押す前に概要を読んでください。 It states how many packages upgrade, whether anything is newly installed, and - most importantly - whether anything will be removed. Removals on a plain upgrade should be rare; if a program you depend on is listed for removal, stop and investigate instead of accepting.
  3. If the summary says some packages were kept back, they need a dependency change - that is what sudo apt full-upgrade is for. Read its summary even more carefully, because full-upgrade is allowed to remove packages to satisfy dependencies.
3

アップグレード中およびアップグレード後

True
4

二度と山に直面しないように準備しましょう

最も健全な Ubuntu は、小規模で頻繁な手順で更新され、Ubuntu はそのほとんどを単独で実行できます。標準インストールでは、自動セキュリティ更新 (無人アップグレード) がデフォルトでオンになっています。これは、更新を修正するときに遭遇した可能性のある apt ロックを時折保持するのと同じサービスです。そのままにしておきます。手動ジョブは毎週の sudo apt update と sudo apt upgrade に縮小されます。これは 2 分間の習慣であり、リストを短く保ち、驚くことはほとんどなく、「動作しているシステム」と「触るのが怖いシステム」の差は永続的に小さくなります。

🔴 ほとんどのアップグレードによる災害を防ぐ習慣: アップグレード時、完全アップグレード時、自動削除時など、毎回、Y を押す前に概要行を読んでください。 apt は常に、アップグレード、削除、および保留されたパッケージを事前に開示します。 「アップデートによりプログラムが削除されました」というすべての話は、未読の要約から始まります。

🎥完全な知識と取り付けについては、完全なビデオをご覧ください。

The video runs the first clean update after the fix, reviews the upgradable list, and completes the upgrade safely.

▶️ Watch Full Video
❓ よくある質問(FAQ)

apt アップグレードと apt フルアップグレードの違いは何ですか?

apt upgrade は新しいバージョンをインストールしますが、パッケージを削除したり、セットを変更する新しい依存関係をインストールしたりすることはありません。保持されていると報告されている必要なものはすべてインストールされます。 apt full-upgrade (古い dist-upgrade) は、新しい依存関係をインストールし、競合するパッケージを削除してアップグレードを完了することができます。これは、カーネルやドライバーの移行などで必要になる場合があります。 Use upgrade routinely, and full-upgrade when kept-back packages persist - reading its removal list carefully before accepting.

アップグレードするたびに再起動する必要がありますか?

No. Most application updates take effect the next time the program starts.カーネルがアップグレードされたときは再起動が必要です。再起動するまで古いカーネルが実行され続けます。また、systemd などのいくつかのコア コンポーネントの場合も再起動が必要です。 Ubuntu は、再起動が必要なときにターミナル出力または通知を通じて明確に通知するため、スケジュールに従って再起動するのではなく、その合図に従ってください。

アップグレードがエラーで途中で停止してしまいました。システムが壊れているのでしょうか?

ほとんどありません。まず sudo dpkg --configure -a を実行して中途半端な設定を完了し、次に apt が依存関係の損傷を示唆する場合は sudo apt --fix-broken install を実行し、その後 sudo apt update と sudo apt upgrade を再度実行します。この手順により、中断されたアップグレードの大部分が解決されます。 What you should not do is reboot repeatedly or start deleting package files by hand - the repair commands exist precisely for this state.

このガイドは、アップデート修正後の Ubuntu の安全なアップグレードに関する Technical Anshu ビデオに基づいています。ビデオのコメントで質問してください - 答えはそこにあります 🙏