昨天升级了一下ubuntu,发现升级过程不是很顺利,我这里分享一下我的经验,在升级前,需要把所有的ppa软件源和相应的软件删除。然后执行下面的操作:

sudo apt-get update && sudo apt-get upgrade
sudo apt install update-manager-core
sudo aptitude remove '~o'
sudo apt auto-remove
sudo do-release-upgrade

中间我还碰见了boot空间不足的问题,于是使用下面的命令删除了多余的kernel:

sudo dpkg --get-selections |grep linux
# 查看自己使用的内核,别删错了
uname -a
# 删除其他的kernel示例
sudo apt-get purge linux-headers-3.0.0-12 linux-image-3.0.0-12-generic

直到腾出空间足够为止,当时我删了十多个kernel才腾出260MB的空间。

然后就升级完成了哈,我们查看一下:

lsb_release -a

ubuntu 16.04升级到ubuntu 18.04_服务器

参考文献

[1].How to Upgrade Ubuntu 16.04 to Ubuntu 18.04. https://www.liquidweb.com/kb/how-to-upgrade-ubuntu-16-04-to-ubuntu-18-04/

[2].Ubuntu – Problems removing PPA using ppa-purge for upgrade to Ubuntu 20.04. https://super-unix.com/ubuntu/ubuntu-problems-removing-ppa-using-ppa-purge-for-upgrade-to-ubuntu-20-04/