5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

コマンドラインからUbuntuアップデート時のメモ(16.04→18.04, 18.04→20.04どちらも)

Last updated at Posted at 2020-11-20

※SSH越しに実行すると、SSH切断時にアップデート失敗になる可能性があります。ネットワーク状況に不安がある場合はOS imageを利用したクリーンインストールをお勧めいたします。
※本手順は参考情報であり、コマンドラインからのバージョンアップに不安がある場合はOS imageを利用したクリーンインストールをお勧めいたします。

基本的に以下コマンドを実行すればアップデートできた(結構時間がかかります)

sudo apt-get -y update; sudo apt-get -y upgrade;
sudo apt-get dist-upgrade;
do-release-upgrade 

途中、対話を求められる場合は基本的には「y」を入力

サポートが中止された(あるいはリポジトリに存在しない)パッケージを削除しますか? 
186 個のパッケージが削除されます。 
パッケージの削除に数時間かかることがあります。 
続行する[yN]  詳細 [d]

完了後、以下からアップデート完了を確認できる

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
…

エラーPlease install all available updates for your release before upgrading.

$ do-release-upgrade 
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

apt-get -y update及びsudo apt-get -y upgradeにより解決

sudo apt-get -y update; sudo apt-get -y upgrade;

エラーYou have not rebooted after updating a package which requires a reboot. Please reboot before upgrading.

$ do-release-upgrade
Checking for a new Ubuntu release
You have not rebooted after updating a package which requires a reboot. Please reboot before upgrading.

rebootして解決

reboot

エラー パッケージのバージョンアップできない

該当パッケージをアンインストールすると良いかもしれない

# (例)ros kineticをアンインストールする場合
sudo apt-get remove ros-*

参考

Please install all available updates for your release before upgrading|Ubuntu

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?