[PLUG] Package can't be deleted

John Jason Jordan johnxj at gmx.com
Sun Oct 18 04:26:40 UTC 2020


I have a program, OSCAR, (yes it's all caps, even the command to run
it), that is used to view data from an SD card installed in a CPAP
machine. OSCAR is FOSS, available these days from apneaboard.com. I had
installed version 1.01 before this morning's dist-upgrade, but I knew
that 1.20 had been released, so while tidying things up I decided to
update OSCAR.

However, during the dist-upgrade I had multiple error messages; so many
that I was worried about being able to boot. And some of the error
messages were about OSCAR and not being able to update it. I should add
that getting OSCAR means downloading a .deb or .rpm file; it's not in
the repositories. I downloaded the .deb file for 1.20, but before
installing it I decided to uninstall 1.01 first. At the time I was in
Synaptic, so I searched, and there was 1.01. I selected it and marked
it to be removed, but when I clicked on Apply I got error messages and
the removal failed. Then I tried to unmark it, but that also failed.
It's still sitting in Synaptic, all in red, and marked for removal.

Then I closed Synaptic, which always warns you that the changes you
made will be lost, but I closed it anyway. And then I re-launched
Synaptic, and there was OSCAR, still all in red, marked to be removed.

Finally, I closed Synaptic again, and went to the command line, where I
got:

sudo apt-get remove oscar
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
	<long list of auto-removable packages, not including OSCAR>
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  oscar
0 upgraded, 0 newly installed, 1 to remove and 56 not upgraded.
2 not fully installed or removed.
After this operation, 9,927 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: error processing package oscar (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
dpkg: too many errors, stopping
Errors were encountered while processing:
 oscar
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

So then I decided to just install it, hoping thus to fix whatever was
wrong with it:
sudo apt-get install oscar
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
	<long list of auto-removable packages, not including OSCAR>
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  oscar
1 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.
2 not fully installed or removed.
Need to get 0 B/3,479 kB of archives.
After this operation, 2,547 kB disk space will be freed.
(Reading database ... 1581526 files and directories currently
installed.) Preparing to unpack
.../oscar_1.1.0-testing-3-3build1_amd64.deb ... rm: cannot remove
'/home/jjj/Desktop/OSCAR.desktop': No such file or directory dpkg:
warning: old oscar package pre-removal script subprocess returned error
exit status 1 dpkg: trying script from the new package instead ...
dpkg: error processing archive
/var/cache/apt/archives/oscar_1.1.0-testing-3-3build1_amd64.deb
(--unpack): there is no script in the new version of the package -
giving up Errors were encountered while processing:
/var/cache/apt/archives/oscar_1.1.0-testing-3-3build1_amd64.deb E:
Sub-process /usr/bin/dpkg returned an error code (1)

So I can't install it, I can't remove it, and it's still marked for
removal in Synaptic. And strangely, it launches and runs as it always
has. And what is installed is 1.01, not 1.1.0-testing, which I never
installed or even downloaded. I don't know where apt-get got the notion
that 1.1.0 is what should be installed.

I still have the.deb file for 1.0.1, which I installed with dpkg. I
haven't tried to reinstall it, nor have I tried to install the .deb
file for 1.2.0. I'd prefer to fix whatever's wrong before doing so, but
I've never run into anything like this before.

Suggestions?



More information about the PLUG mailing list