Error during uninstalling Package

I tried to uninstall Python from my KDE neon (based on Ubuntu 24.04).
But I have this problem after use “sudo apt remove --purge python3”. How to fix it?

If it is just giving you the error not actually having removed it then do not try it again it is a basic mandatory package.

root@9600k:~# apt -s remove python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:

The following packages have unmet dependencies:
 shim-signed : Depends: grub-efi-amd64-signed (>= 1.191~) but it is not going to be installed or
                    grub-efi-arm64-signed (>= 1.191~) but it is not installable or
                    base-files (< 12.3)
           Depends: grub-efi-amd64-signed (>= 1.187.2~) but it is not going to be installed or
                    grub-efi-arm64-signed (>= 1.187.2~) but it is not installable
           Depends: grub2-common (>= 2.04-1ubuntu24) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

The above simulation of the removal shows the same type of output you get when doing it. Again if it has not done it NEVER try it again you will destroy the system and get to reinstall. And what would make you think you needed to uninstall the python packages in the first place?

1 Like

If that, I can’t upgrade my package because I have three errors during update.

Unfortunately it appears you need to do a reinstall. Backup any data you want to keep from the machine before wiping it.