Whenever I am trying to upgrade anything, I am getting the following message:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
nvidia-kernel-common-465 : Depends: nvidia-kernel-common-470 but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
And If I try to run
sudo apt --fix-broken install
I get the following output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
nvidia-kernel-common-470
The following NEW packages will be installed:
nvidia-kernel-common-470
0 upgraded, 1 newly installed, 0 to remove and 193 not upgraded.
1 not fully installed or removed.
Need to get 0 B/16,5 MB of archives.
After this operation, 36,1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 387623 files and directories currently installed.)
Preparing to unpack .../nvidia-kernel-common-470_470.57.02-0ubuntu0.21.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-470 (470.57.02-0ubuntu0.21.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-kernel-common-470_470.57.02-0ubuntu0.21.04.1_amd64.deb (--unpack
):
trying to overwrite '/lib/systemd/system/nvidia-hibernate.service', which is also in package nvidia-driver-465 465.31-1pop0~1
623777959~20.04~a3ca7f3~dev
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-kernel-common-470_470.57.02-0ubuntu0.21.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried almost everything that I could find on the internet. Even tried to remove/purge completely the Nvidia drivers, but I can't because ubuntu saying the following:
The following packages have unmet dependencies:
nvidia-kernel-common-465 : Depends: nvidia-kernel-common-470 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
So I am kinda stuck in a loop, and I don't know what to do.
Any idea?