I've run into installation errors when upgrading packages and release of Ubuntu 22.10.

The details are listed below:

sudo do-release-upgrade

Checking for a new Ubuntu release

= Welcome to Ubuntu 23.04 'Lunar Lobster' =

The Ubuntu team is proud to announce Ubuntu 23.04 'Lunar Lobster'.


Continue [yN] y
Get:1 Upgrade tool signature [819 B]                                                                                                                                        
Get:2 Upgrade tool [1,260 kB]                                                                                                                                               
Fetched 1,261 kB in 0s (0 B/s)                                                                                                                                              
authenticate 'lunar.tar.gz' against 'lunar.tar.gz.gpg' 
extracting 'lunar.tar.gz'
can't load 22.04 (No module named 'DistUpgrade.22')
Error in sys.excepthook:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/DistUpgradeViewGtk3.py", line 540, in _handleException
    apport_crash(type, value, tb)
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/DistUpgradeApport.py", line 57, in apport_crash
    apport_excepthook(type, value, tb)
TypeError: apport_excepthook() missing 1 required positional argument: 'exc_tb'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/lunar", line 8, in <module>
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/DistUpgradeMain.py", line 238, in main
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/DistUpgradeMain.py", line 125, in save_system_state
    clone.save_state(sourcedir="/", target=target, with_dpkg_status=True,
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/apt_clone.py", line 154, in save_state
    self._write_state_installed_pkgs(sourcedir, tar)
  File "/tmp/ubuntu-release-upgrader-lmzh0l52/DistUpgrade/apt_clone.py", line 192, in _write_state_installed_pkgs
    cache = self._cache_cls(rootdir=sourcedir)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 152, in __init__
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 214, in open
    self._cache = apt_pkg.Cache(progress)
apt_pkg.Error: E:The value 'jammy' is invalid for APT::Default-Release as such a release is not available in the sources

I've tried to solve the problem by modifying apt::default release but I didn't find the release file ''don't have release file''

please help me how to pass this hurdle

  • You can edit out all the PR junk. Commented Jun 4, 2023 at 4:13

2 Answers 2


You can only upgrade to Ubuntu 23.04 from Ubuntu 22.10. Going backwards from Ubuntu 22.10 to Ubuntu 22.04 (jammy) is not upgrading, it's downgrading. That's why you got this error message: The value 'jammy' is invalid for APT::Default-Release.

If you want to downgrade from Ubuntu 22.10 to Ubuntu 22.04 the safest way to do it is by backing up your data and fresh installing Ubuntu 22.04.

  • thank you for your advice i got this message also when trying to upgrade I succeeded in solving the problem and will share the steps below
    – ahm22004
    Commented Jun 5, 2023 at 19:57

although the original question was written as a trial to downgrade the version, I received the same output when I tried to upgrade also I've succeeded in solving this problem with the assistance of ai sage of Poe it guided me to install Synaptic package manager sudo apt install synaptic which is available on the universal repository of Ubuntu then I selected the installed packages, by clicking status button and using ctrl+a to choose all packages then I marked them to reinstall by clicking on package droplist and clicking on mark to reinstall then I rebooted the system to complete the process after the reinstall was finished then I used full upgrade command several times with rebooting in between till finished sudo apt full-upgrade when all these steps are completed the system was upgraded to version 2304 Best regards

  • No thanks for your aggressive language I've already tried all formatting I can then all of it are deleted when I published my post, as what appear for me in your comment If you want to advise others, use proper language If you don't accept some comments or answers, I think that the platform gave you the choice of downvote KEEP YOUR PUBLIC ENMITY FOR YOURSELF
    – ahm22004
    Commented Jun 16, 2023 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .