I'm trying to remove the "lazarus-src-2.2" package on my Ubuntu system, but I'm encountering an error that I can't resolve. Here's the output of the sudo apt remove lazarus-src-2.2
command:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
lazarus-src-2.2
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 158 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... currently installed 586632 files and directories.)
Removing lazarus-src-2.2 (2.2.0+dfsg1-5ubuntu1) ...
dpkg-divert: error: file name 'to' is not an absolute path
Use --help for help about diverting files.
dpkg: error processing package lazarus-src-2.2 (--remove):
installed lazarus-src-2.2 package post-removal script returned error exit status 2
Too many errors encountered, stopping
Processing triggers for libc-bin (2.31-0ubuntu9.16) ...
Errors were encountered while processing:
lazarus-src-2.2
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
How can I solve this issue and successfully remove the "lazarus-src-2.2" package? I've tried reinstalling the package and using the dpkg --remove --force-remove-reinstreq command, but with no success. Any help would be appreciated!
sudo apt list | grep "lazarus"
lazarus-2.2/jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
lazarus-doc-2.2/jammy,jammy,now 2.2.0+dfsg1-5ubuntu1 all [installed]
lazarus-doc/jammy,jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
lazarus-ide-2.2/jammy,jammy,now 2.2.0+dfsg1-5ubuntu1 amd64 [installed]
lazarus-ide-gtk2-2.2/jammy,now 2.2.0+dfsg1-5ubuntu1 amd64 [installed]
lazarus-ide-gtk2/jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
lazarus-ide-qt5-2.2/jammy 2.2.0+dfsg1-5ubuntu1 amd64
lazarus-ide-qt5/jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
lazarus-ide/jammy,jammy,now 2.2.0+dfsg1-5ubuntu1 all [installed]
lazarus-src-2.2/jammy,jammy,now 2.2.0+dfsg1-5ubuntu1 all [installed]
lazarus-src/jammy,jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
lazarus/jammy,jammy 2.2.0+dfsg1-5ubuntu1 all
uname -a
Linux user-pc 5.15.0-73-generic #80-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux