Ubuntu 20.04升级至22.04进程停滞求助
Hey Alan, sorry to hear your upgrade got stuck mid-process—let’s get this sorted out for you. Since your graphical interface is unresponsive but the mouse still moves, here’s a step-by-step approach to fix this:
Switch to a virtual terminal
Your GUI might be frozen, but the underlying system is likely still running. PressCtrl+Alt+F3(you can try F2-F6 if F3 doesn’t work) to open a text-based login screen. Enter your username and password to log in.Check if upgrade processes are still active
Run this command to see if any apt/dpkg-related processes are still running:ps aux | grep -E "apt|dpkg"If you see active processes related to the upgrade, you could wait a bit longer (though you’ve already waited a while). If they look stuck or unresponsive, proceed to the next step.
Fix the stuck package configuration
First, safely terminate any hanging apt processes:sudo killall apt apt-getThen, let dpkg repair the interrupted configuration and finish any pending tasks (including removing that obsolete network-manager conffile):
sudo dpkg --configure -aThis command will pick up where the upgrade left off and resolve any blocked steps.
Complete the upgrade
Oncedpkg --configure -afinishes without errors, run these commands to ensure all packages are fully upgraded:sudo apt update sudo apt upgrade -y sudo apt dist-upgrade -yReboot and verify
Finally, reboot your system to apply all changes:sudo rebootAfter restarting, check your Ubuntu version to confirm the upgrade worked:
lsb_release -aYou should see "Ubuntu 22.04 LTS" listed.
A quick note: If switching to the virtual terminal doesn’t work and you have to do a hard reboot (hold the power button), don’t panic—just run sudo dpkg --configure -a immediately after logging back in to fix any broken package states from the interrupted upgrade.
备注:内容来源于stack exchange,提问作者Alan_K

