Half-installed package nightmare - how to fix?

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











up vote
1
down vote

favorite












I recently (tried) to update my Linux Mint (18.3, x64) system. It went fine, but I got an error with the configuration scripts for linux-image-extra-4.13.0-41-generic and linux-image-extra-4.13.0-41-generic. For a while, I could install other packages, but after attempting to remove them, I could no longer install anything. To remove them, I have tried:



 sudo apt remove linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
sudo apt purge linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
sudo apt install -f
sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic


None of them removed the packages.



I also get this as when attempting to install a package:



Removing linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-41-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
Warning: No support for locale: en_US.utf8
depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
dpkg: error processing package linux-image-extra-4.13.0-41-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
update-initramfs: Deleting /boot/initrd.img-4.13.0-41-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-41-generic.postrm line 330.
dpkg: error processing package linux-image-4.13.0-41-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.13.0-41-generic
linux-image-4.13.0-41-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)


There's not much else I could do besides reinstall the system.



Any other ideas to force remove this package?







share|improve this question























    up vote
    1
    down vote

    favorite












    I recently (tried) to update my Linux Mint (18.3, x64) system. It went fine, but I got an error with the configuration scripts for linux-image-extra-4.13.0-41-generic and linux-image-extra-4.13.0-41-generic. For a while, I could install other packages, but after attempting to remove them, I could no longer install anything. To remove them, I have tried:



     sudo apt remove linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
    sudo apt purge linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
    sudo apt install -f
    sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
    sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic


    None of them removed the packages.



    I also get this as when attempting to install a package:



    Removing linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
    depmod: FATAL: could not load /boot/System.map-4.13.0-41-generic: No such file or directory
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
    Warning: No support for locale: en_US.utf8
    depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.order: No such file or directory
    depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.builtin: No such file or directory
    run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    Generating grub configuration file ...
    Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
    No path or device is specified.
    Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
    Try 'grub-probe --help' or 'grub-probe --usage' for more information.
    No path or device is specified.
    Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
    Try 'grub-probe --help' or 'grub-probe --usage' for more information.
    run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
    dpkg: error processing package linux-image-extra-4.13.0-41-generic (--remove):
    subprocess installed post-removal script returned error exit status 1
    Removing linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    update-initramfs: Deleting /boot/initrd.img-4.13.0-41-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
    Generating grub configuration file ...
    Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
    No path or device is specified.
    Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
    Try 'grub-probe --help' or 'grub-probe --usage' for more information.
    No path or device is specified.
    Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
    Try 'grub-probe --help' or 'grub-probe --usage' for more information.
    run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
    Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-41-generic.postrm line 330.
    dpkg: error processing package linux-image-4.13.0-41-generic (--remove):
    subprocess installed post-removal script returned error exit status 1
    Errors were encountered while processing:
    linux-image-extra-4.13.0-41-generic
    linux-image-4.13.0-41-generic
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    There's not much else I could do besides reinstall the system.



    Any other ideas to force remove this package?







    share|improve this question





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I recently (tried) to update my Linux Mint (18.3, x64) system. It went fine, but I got an error with the configuration scripts for linux-image-extra-4.13.0-41-generic and linux-image-extra-4.13.0-41-generic. For a while, I could install other packages, but after attempting to remove them, I could no longer install anything. To remove them, I have tried:



       sudo apt remove linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo apt purge linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo apt install -f
      sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic


      None of them removed the packages.



      I also get this as when attempting to install a package:



      Removing linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
      depmod: FATAL: could not load /boot/System.map-4.13.0-41-generic: No such file or directory
      run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
      Warning: No support for locale: en_US.utf8
      depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.order: No such file or directory
      depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.builtin: No such file or directory
      run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      Generating grub configuration file ...
      Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
      dpkg: error processing package linux-image-extra-4.13.0-41-generic (--remove):
      subprocess installed post-removal script returned error exit status 1
      Removing linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
      Examining /etc/kernel/postrm.d .
      run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      update-initramfs: Deleting /boot/initrd.img-4.13.0-41-generic
      run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      Generating grub configuration file ...
      Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
      Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-41-generic.postrm line 330.
      dpkg: error processing package linux-image-4.13.0-41-generic (--remove):
      subprocess installed post-removal script returned error exit status 1
      Errors were encountered while processing:
      linux-image-extra-4.13.0-41-generic
      linux-image-4.13.0-41-generic
      E: Sub-process /usr/bin/dpkg returned an error code (1)


      There's not much else I could do besides reinstall the system.



      Any other ideas to force remove this package?







      share|improve this question











      I recently (tried) to update my Linux Mint (18.3, x64) system. It went fine, but I got an error with the configuration scripts for linux-image-extra-4.13.0-41-generic and linux-image-extra-4.13.0-41-generic. For a while, I could install other packages, but after attempting to remove them, I could no longer install anything. To remove them, I have tried:



       sudo apt remove linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo apt purge linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo apt install -f
      sudo dpkg --remove --force-remove-reinstreq --dry-run linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic
      sudo dpkg --remove --force-remove-reinstreq linux-image-extra-4.13.0-41-generic linux-image-extra-4.13.0-41-generic


      None of them removed the packages.



      I also get this as when attempting to install a package:



      Removing linux-image-extra-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
      depmod: FATAL: could not load /boot/System.map-4.13.0-41-generic: No such file or directory
      run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      update-initramfs: Generating /boot/initrd.img-4.13.0-41-generic
      Warning: No support for locale: en_US.utf8
      depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.order: No such file or directory
      depmod: WARNING: could not open /var/tmp/mkinitramfs_3hnLlc/lib/modules/4.13.0-41-generic/modules.builtin: No such file or directory
      run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      Generating grub configuration file ...
      Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 64
      dpkg: error processing package linux-image-extra-4.13.0-41-generic (--remove):
      subprocess installed post-removal script returned error exit status 1
      Removing linux-image-4.13.0-41-generic (4.13.0-41.46~16.04.1) ...
      Examining /etc/kernel/postrm.d .
      run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      update-initramfs: Deleting /boot/initrd.img-4.13.0-41-generic
      run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-41-generic /boot/vmlinuz-4.13.0-41-generic
      Generating grub configuration file ...
      Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      No path or device is specified.
      Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
      Try 'grub-probe --help' or 'grub-probe --usage' for more information.
      run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 64
      Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.13.0-41-generic.postrm line 330.
      dpkg: error processing package linux-image-4.13.0-41-generic (--remove):
      subprocess installed post-removal script returned error exit status 1
      Errors were encountered while processing:
      linux-image-extra-4.13.0-41-generic
      linux-image-4.13.0-41-generic
      E: Sub-process /usr/bin/dpkg returned an error code (1)


      There's not much else I could do besides reinstall the system.



      Any other ideas to force remove this package?









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jun 6 at 23:54









      Zackary

      168




      168

























          active

          oldest

          votes











          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f448310%2fhalf-installed-package-nightmare-how-to-fix%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448310%2fhalf-installed-package-nightmare-how-to-fix%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

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

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay