Unable to remove CLI library packages

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2














I was installing some packages and during the install of one, the system hung and the package was not installed. But, the package was added to the list of installed packages. So, I restart the system and I try the following:



  • When I try to remove the package, it doesn't work because it can't find a config file.


  • When I try to install the package, it says the package is already installed, and therefore won't install it


  • When I try to update, it tries to remove the package, and encounters the error above.


So, my question is asking if there's a way to manually remove a package from the list of installed packages, or is there another way to solve this problem?



When I run: sudo apt-get upgrade



Error is:



Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
libglade2.0-cil libglib2.0-cil libgtk2.0-cil
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
18 not fully installed or removed.
After this operation, 2,819 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 119043 files and directories currently installed.)
Removing libglade2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.8.glade-sharp.installcligac
dpkg: error processing package libglade2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libgtk2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac
dpkg: error processing package libgtk2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libglib2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
dpkg: error processing package libglib2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
libglade2.0-cil
libgtk2.0-cil
libglib2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)









share|improve this question























  • There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
    – Ginkoid
    Apr 8 '17 at 17:49











  • What if you just create the missing file. Does that make the post-removal script happy?
    – larsks
    Apr 8 '17 at 18:18










  • I tried that; the removal script just deletes the file then gives the same error
    – Ginkoid
    Apr 8 '17 at 18:19















2














I was installing some packages and during the install of one, the system hung and the package was not installed. But, the package was added to the list of installed packages. So, I restart the system and I try the following:



  • When I try to remove the package, it doesn't work because it can't find a config file.


  • When I try to install the package, it says the package is already installed, and therefore won't install it


  • When I try to update, it tries to remove the package, and encounters the error above.


So, my question is asking if there's a way to manually remove a package from the list of installed packages, or is there another way to solve this problem?



When I run: sudo apt-get upgrade



Error is:



Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
libglade2.0-cil libglib2.0-cil libgtk2.0-cil
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
18 not fully installed or removed.
After this operation, 2,819 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 119043 files and directories currently installed.)
Removing libglade2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.8.glade-sharp.installcligac
dpkg: error processing package libglade2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libgtk2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac
dpkg: error processing package libgtk2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libglib2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
dpkg: error processing package libglib2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
libglade2.0-cil
libgtk2.0-cil
libglib2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)









share|improve this question























  • There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
    – Ginkoid
    Apr 8 '17 at 17:49











  • What if you just create the missing file. Does that make the post-removal script happy?
    – larsks
    Apr 8 '17 at 18:18










  • I tried that; the removal script just deletes the file then gives the same error
    – Ginkoid
    Apr 8 '17 at 18:19













2












2








2







I was installing some packages and during the install of one, the system hung and the package was not installed. But, the package was added to the list of installed packages. So, I restart the system and I try the following:



  • When I try to remove the package, it doesn't work because it can't find a config file.


  • When I try to install the package, it says the package is already installed, and therefore won't install it


  • When I try to update, it tries to remove the package, and encounters the error above.


So, my question is asking if there's a way to manually remove a package from the list of installed packages, or is there another way to solve this problem?



When I run: sudo apt-get upgrade



Error is:



Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
libglade2.0-cil libglib2.0-cil libgtk2.0-cil
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
18 not fully installed or removed.
After this operation, 2,819 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 119043 files and directories currently installed.)
Removing libglade2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.8.glade-sharp.installcligac
dpkg: error processing package libglade2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libgtk2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac
dpkg: error processing package libgtk2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libglib2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
dpkg: error processing package libglib2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
libglade2.0-cil
libgtk2.0-cil
libglib2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)









share|improve this question















I was installing some packages and during the install of one, the system hung and the package was not installed. But, the package was added to the list of installed packages. So, I restart the system and I try the following:



  • When I try to remove the package, it doesn't work because it can't find a config file.


  • When I try to install the package, it says the package is already installed, and therefore won't install it


  • When I try to update, it tries to remove the package, and encounters the error above.


So, my question is asking if there's a way to manually remove a package from the list of installed packages, or is there another way to solve this problem?



When I run: sudo apt-get upgrade



Error is:



Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
libglade2.0-cil libglib2.0-cil libgtk2.0-cil
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
18 not fully installed or removed.
After this operation, 2,819 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 119043 files and directories currently installed.)
Removing libglade2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.8.glade-sharp.installcligac
dpkg: error processing package libglade2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libgtk2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.gtk-dotnet.installcligac
dpkg: error processing package libgtk2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Removing libglib2.0-cil (2.12.26-0xamarin1) ...
E: File does not exist: /usr/share/cli-common/packages.d/policy.2.6.glib-sharp.installcligac
dpkg: error processing package libglib2.0-cil (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
libglade2.0-cil
libgtk2.0-cil
libglib2.0-cil
E: Sub-process /usr/bin/dpkg returned an error code (1)






debian apt package-management raspbian mono






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 8 '17 at 23:09









Gilles

527k12710561581




527k12710561581










asked Apr 8 '17 at 17:09









Ginkoid

305




305











  • There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
    – Ginkoid
    Apr 8 '17 at 17:49











  • What if you just create the missing file. Does that make the post-removal script happy?
    – larsks
    Apr 8 '17 at 18:18










  • I tried that; the removal script just deletes the file then gives the same error
    – Ginkoid
    Apr 8 '17 at 18:19
















  • There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
    – Ginkoid
    Apr 8 '17 at 17:49











  • What if you just create the missing file. Does that make the post-removal script happy?
    – larsks
    Apr 8 '17 at 18:18










  • I tried that; the removal script just deletes the file then gives the same error
    – Ginkoid
    Apr 8 '17 at 18:19















There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
– Ginkoid
Apr 8 '17 at 17:49





There's actually 3, they're called libglade2.0-cil, libglib2.0-cil, and libgtk2.0-cil. They were installed as part of mono, but I have managed to remove all the other mono packages. I am using command-line tools.
– Ginkoid
Apr 8 '17 at 17:49













What if you just create the missing file. Does that make the post-removal script happy?
– larsks
Apr 8 '17 at 18:18




What if you just create the missing file. Does that make the post-removal script happy?
– larsks
Apr 8 '17 at 18:18












I tried that; the removal script just deletes the file then gives the same error
– Ginkoid
Apr 8 '17 at 18:19




I tried that; the removal script just deletes the file then gives the same error
– Ginkoid
Apr 8 '17 at 18:19










1 Answer
1






active

oldest

votes


















2














There are a couple of approaches to try.



The first is to fix /usr/share/cli-common/policy-remove so it doesn’t fail if the policy is absent: edit its last line so that it runs rm -f instead of rm. That should allow the packages to be removed correctly.



If that fails, and since you’re trying to remove all the Mono packages, it should be safe enough to remove the failing postrm scripts:



sudo rm /var/lib/dpkg/info/libglade,glib,gtk2.0-cil.postrm


The only operation the postrm scripts do is unregister the policies, which you don’t care about since you’re removing everything anyway.



You’re not the only person to have suffered from this issue: it was reported in 2012 as Debian bug 692962.






share|improve this answer




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f357798%2funable-to-remove-cli-library-packages%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    There are a couple of approaches to try.



    The first is to fix /usr/share/cli-common/policy-remove so it doesn’t fail if the policy is absent: edit its last line so that it runs rm -f instead of rm. That should allow the packages to be removed correctly.



    If that fails, and since you’re trying to remove all the Mono packages, it should be safe enough to remove the failing postrm scripts:



    sudo rm /var/lib/dpkg/info/libglade,glib,gtk2.0-cil.postrm


    The only operation the postrm scripts do is unregister the policies, which you don’t care about since you’re removing everything anyway.



    You’re not the only person to have suffered from this issue: it was reported in 2012 as Debian bug 692962.






    share|improve this answer

























      2














      There are a couple of approaches to try.



      The first is to fix /usr/share/cli-common/policy-remove so it doesn’t fail if the policy is absent: edit its last line so that it runs rm -f instead of rm. That should allow the packages to be removed correctly.



      If that fails, and since you’re trying to remove all the Mono packages, it should be safe enough to remove the failing postrm scripts:



      sudo rm /var/lib/dpkg/info/libglade,glib,gtk2.0-cil.postrm


      The only operation the postrm scripts do is unregister the policies, which you don’t care about since you’re removing everything anyway.



      You’re not the only person to have suffered from this issue: it was reported in 2012 as Debian bug 692962.






      share|improve this answer























        2












        2








        2






        There are a couple of approaches to try.



        The first is to fix /usr/share/cli-common/policy-remove so it doesn’t fail if the policy is absent: edit its last line so that it runs rm -f instead of rm. That should allow the packages to be removed correctly.



        If that fails, and since you’re trying to remove all the Mono packages, it should be safe enough to remove the failing postrm scripts:



        sudo rm /var/lib/dpkg/info/libglade,glib,gtk2.0-cil.postrm


        The only operation the postrm scripts do is unregister the policies, which you don’t care about since you’re removing everything anyway.



        You’re not the only person to have suffered from this issue: it was reported in 2012 as Debian bug 692962.






        share|improve this answer












        There are a couple of approaches to try.



        The first is to fix /usr/share/cli-common/policy-remove so it doesn’t fail if the policy is absent: edit its last line so that it runs rm -f instead of rm. That should allow the packages to be removed correctly.



        If that fails, and since you’re trying to remove all the Mono packages, it should be safe enough to remove the failing postrm scripts:



        sudo rm /var/lib/dpkg/info/libglade,glib,gtk2.0-cil.postrm


        The only operation the postrm scripts do is unregister the policies, which you don’t care about since you’re removing everything anyway.



        You’re not the only person to have suffered from this issue: it was reported in 2012 as Debian bug 692962.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 8 '17 at 18:42









        Stephen Kitt

        163k24364443




        163k24364443



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f357798%2funable-to-remove-cli-library-packages%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?