5

I decided to shift around my partitions on my hard drive for a fresh install of Kubuntu. I booted my Ubuntu 10.10 live disc, shifted everything around and attempted to install grub and it didn't work, so I burnt an Ubuntu 12.04 disc and installed it.

I got the computer working and wanted to install some packages, but didn't have an internet connection at the time. So (I know this was stupid) I got some debs from previous versions of Ubuntu, as I needed my music, and the other install took a long of time to boot.

Once I got my internet connection back, everything worked ok, for a little while. Then I stumbled upon this problem after removing ten broken packages using synaptic:

drhax@Spamotard:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libgtk2.0-cil
0 upgraded, 0 newly installed, 1 to remove and 417 not upgraded.
1 not fully installed or removed.
After this operation, 2,638 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 103052 files and directories currently installed.)
Removing libgtk2.0-cil ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac
dpkg: error processing libgtk2.0-cil (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 libgtk2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)

Help would be appreciated. This is my first post, but I do know fair bit about Ubuntu, so feel free to point out any stupid mistakes I have made.

3 Answers 3

5
sudo dpkg -P --force-all libgtk2.0-cil

Was not enough for me I had to :

sudo mv /var/lib/dpkg/info/libgtk2.0-cil.postrm /var/lib/dpkg/info/libgtk2.0-cil.postrm.tmp

sudo dpkg -P --force-all libgtk2.0-cil

I renamed other files but it may not be needed :

/var/lib/dpkg/info/libgtk2.0-cil.clilibs.tmp
/var/lib/dpkg/info/libgtk2.0-cil.md5sums.tmp
/var/lib/dpkg/info/libgtk2.0-cil.postrm.tmp
/var/lib/dpkg/info/libgtk2.0-cil.list.tmp
/var/lib/dpkg/info/libgtk2.0-cil.postinst.tmp
/var/lib/dpkg/info/libgtk2.0-cil.prerm.tmp

-- http://rzr.online.fr/q/dpkg

1
  • You are my saviour! It worked like a charm. I thought that I had trashed my installation because of a similiar issue.
    – CKA
    Jul 19, 2019 at 11:34
4

Force the package removal with: sudo dpkg -P --force-all libgtk2.0-cil.

1
  • 2
    This post is a bit old, but if this is happening, please also file a bug against libgtk2.0-cil
    – mfisch
    Nov 19, 2012 at 0:24
0

I had the same issue and found an answer. If you're getting a File doesn't exist error, you can just create an empty file where it needs to be in order to remove the package.

For example, sudo touch /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac.

When the postrm script runs, the file you created will be removed.

1
  • yes I had this error when I deleted the files before uninstalling them, so I temporarily restored them
    – qwr
    Sep 18, 2022 at 1:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .