Due to a supposed problem in my Ubuntu 18's packages, I could not upgrade to Ubuntu 20. Instead of checking what was going wrong with all the packages problems, I solved one or two packages problems (I think) and then, even if some problems were still present (I think), I wanted to start the upgrade to Ubuntu 20 (big mistake...!).
The graphical upgrader (or CLI, I don't remember) told me that I was going to do a Partial Upgrade. I clicked on "Continue". Then, I stopped it.
I'm still on Ubuntu 18. So the partial upgrade isn't done I think.
Now when I type: sudo apt-get update/upgrade/dist-upgrade
, I get:
The following packages were automatically installed and are no longer required:
(lots of packages)
The following packages will be REMOVED:
(lots of packages)
The following NEW packages will be installed:
(lots of packages)
The following packages will be upgraded:
(lots of packages)
2009 upgraded, 377 newly installed, 104 to remove and 0 not upgraded.
I think all these packages are related to my Partial Upgrade. However I want to cancel my Partial Upgrade. In other words, I don't want to see all these packages. What should I do?
What I've already tried
sudo rm /var/lib/apt/lists/*
but it didn't work...
The file
/etc/apt/sources.list
was rewritten by the upgrader (Ubuntu 18.04.5 wordbionic
was replaced byfocal
, for Ubuntu 20). I have edited this file in order to replacefocal
bybionic
. Then I've typedsudo apt-get update
. Now the problem is solved. When I typesudo apt-get update ; apt-get upgrade ; apt-get dist-upgrade
it works well: I have no package listed!NB: I looked in
/etc/apt/sources.list.d
, all the files containbionic
so I didn't have to replace anything here.