You are here

Lucid to Precise Kubuntu upgrade: adobe-flashplugin cannot be removed

Submitted by Druss on Mon, 2012-03-26 22:53

So I tried updating one of my boxen running the Lucid Kubuntu LTS to the new Precise Pangolin beta. During the upgrade, I received an error message stating that adobe-flashplugin could not be upgraded. I ignored it and continued with the upgrade and all went swimmingly. Once the upgrade was completed and I had rebooted, when I tried to run an apt-get update, I ran into an error with respect to the adobe-flashplugin package. When I tried to remove it, it did not work. As a stop-gap measure, I removed a number of packages that depended on it including Firefox and sun-java6. I could then use apt and get other updates down.

Now that my system was up to date, I decided to see if I could remove adobe-flashplugin once again. This is what happened:

$ sudo aptitude remove adobe-flashplugin
The following packages will be REMOVED:
  adobe-flashplugin
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 10.4 MB will be freed.
(Reading database ... 701347 files and directories currently installed.)
Removing adobe-flashplugin ...
update-alternatives: error: no alternatives for iceape-flashplugin.
update-alternatives: error: no alternatives for iceape-flashplugin.
dpkg: error processing adobe-flashplugin (--remove):
subprocess installed pre-removal script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              postinst called with argument `abort-remove'
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
adobe-flashplugin
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

As you can tell, this is the kind of shyte that can get old real fast. I subsequently tried purging, removing directly using dpkg etc., and nothing worked. I then decided to use my head just a wee bit and look at the error message. Seeing as to how the issue was apparently with a pre-removal script, and a tell-tale pointer to something called the iceape-flashplugin, I decided to investigate further with this package in mind. Google informed me of two possible solutions:

  1. (Backing up and) removing a file named /var/lib/dpkg/info/adobe-flashplugin.postinst and then removing the package.
  2. Installing the mozilla-plugin-gnash package which apparently registered an iceape-flashplugin entry with update-alternatives.

Neither of these worked for me.

I then went ahead and did some searching for files names flashplugin which had a reference to anything named iceape. Baby Jebus wept as I found one entry at /var/lib/dpkg/info/adobe-flashplugin.prerm. A tell-tale name if ever there was one ... Opening this file in an editor revealed a two page script presumably dealing with setting the default plugin in case this one was removed. Of particular interest was a single line titled:
VARIANTS="iceape ..."

I simply change this line to VARIANTS="" and saved the file. When I updated aptitude and then tried removing the adobe-flashplugin package once again, voila! it worked!

I hope that this saves a couple of hours of somebody's time somewhere!

Comments

Thanks a bunch for this - your suggestion worked perfectly for me. You saved half a head of hair that I hadn't yet torn out.

Thank you for this, I would have never figured this out on my own!

WORKED FINALLY!!!

I kept looking for an answer for months....

BABY JESUS, thx dude