what can one do if the power shuts down during apt install?

If none of the more specific forums is the right place to ask

what can one do if the power shuts down during apt install?

Postby MagicPoulp » 2020-12-02 14:30

If I install a large package and in the middle the electrial power shuts down.

Is it possible after rebooting to cleanup?

This is just a theoretical question.
MagicPoulp
 
Posts: 423
Joined: 2018-11-05 21:30

Re: what can one do if the power shuts down during apt insta

Postby sgosnell » 2020-12-02 15:19

After rebooting run
Code: Select all
sudo apt -f install
You can also just reinstall the package. It depends on how far into the installation apt got before losing power. It should be safe to do a reinstall in any case.
Code: Select all
sudo apt install --reinstall packagename
but if the installation was nearly finished, you may get an error and need to do the first listed. I would suggest using both in the order listed.
Take my advice, I'm not using it.
sgosnell
 
Posts: 974
Joined: 2011-03-14 01:49

Re: what can one do if the power shuts down during apt insta

Postby CwF » 2020-12-02 15:35

I once had an SSD go read-only during an update, similar. The system partially crashed and could not do a controlled shutdown, and came back up to a prompt only. I imaged the disk and did the recovery in a vm. It turned out to be fixable live, but the image gives infinite attempts. Aptitude on the command line fixed it up. That was 3 years ago maybe, the system is still running today as buster.
CwF
 
Posts: 893
Joined: 2018-06-20 15:16

Re: what can one do if the power shuts down during apt insta

Postby Head_on_a_Stick » 2020-12-02 17:20

MagicPoulp wrote:Is it possible after rebooting to cleanup?

Code: Select all
# dpkg --configure -a
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13087
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: what can one do if the power shuts down during apt insta

Postby MagicPoulp » 2020-12-09 10:59

And if it is not bootable, one can change the grub starting step with this:
init=/bin/sh (sh = dash)
MagicPoulp
 
Posts: 423
Joined: 2018-11-05 21:30


Return to General Questions

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable