1

After upgrading to Debian 10.7 I got this error, possibly due to lack of storage space: Error while installing package: installed initramfs-tools package post installation script: subprocess returned error exit status 1

How to ensure that the package is correctly installed? Should it be reinstalled (how)?

No packages are shown to remain to be upgraded when running sudo apt-get auto-remove && sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade (except "python3-psycopg2" which is held back because "Depends: python3 (< 3.6) but 3.7.3-1 is to be installed").

1 Answer 1

3

When a package post installation script fails, the package remains in “half-configured” state, and any subsequent operation which touches packages should run the post installation script again.

You can check initramfs-tools’ state by running

dpkg -l initramfs-tools

If this shows

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version       Architecture Description
+++-===============-=============-============-================================================
ii  initramfs-tools 0.133+deb10u1 all          generic modular initramfs generator (automation)

then nothing further needs to be done.

If the second column shows F, then the package is half-configured, and configuration can be completed by running

sudo dpkg --configure --pending

If you’d rather re-install the package instead, run

sudo apt-get install --reinstall initramfs-tools
2
  • It showed the result that indicates that nothing needs to be done. Why did it return an error exit status 1 in that case? If that command/output makes sure that it doesn't need to be reinstalled or reconfigured all the better.
    – mYnDstrEAm
    Dec 5, 2020 at 19:54
  • 1
    The upgrade would normally run the failing installation script again; presumably it worked the second time round. Dec 5, 2020 at 21:16

You must log in to answer this question.

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