The officially official Devuan Forum!

You are not logged in.

#1 2018-10-10 16:03:59

Psud0nym
Member
From: Villa Rica, Georgia, USA
Registered: 2018-03-23
Posts: 6  
Website

Correcting Broken Packages

For these first two steps, many people have better results with ‘aptitude’ finding a resolution.
This command may help, but it is not installed by default in Devuan. If you recall it and install it after the broken package situation is resolved, it is worth trying.

*PACKAGE is meant to be a package name that is broken. Replace a package name when using the commands.

Step one:

sudo apt-get update –fix-missing
sudo dpkg –configure -a
sudo apt-get install -f

Step two:

sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update

you may need to delete the lock files. Lock files are used to keep resources available for certain programs – it helps prevent other programs from accessing files at the same time. This can be done by simply deleting the lockfile list:

sudo rm /var/lib/apt/lists/lock

Step three:

sudo apt-get remove PACKAGE

It probably won’t be successful, but it is worth trying before removing it forcefully.

Depending on the errors you get when trying to remove the package normally, you might be able to identify the broken package using dpkg and grep:

dpkg -l | grep ^..r

This command lists all packages, then grep lists any results containing the ‘r’ flag in the third field, which means “reinst-required” (reinstall required). If the broken package shows up, you will be able to remove it.

Execute the following command to forcefully remove the package from your machine. Don’t forget to enter your password to authorize the deletion. Replace with the name of the broken package.

sudo dpkg --remove --force-remove-reinstreq PACKAGE
sudo apt-get clean
sudo apt-get update

After that, try to install the package from scratch. It should install normally now.

Last try step:
This pair of commands will remove the packages scripts to be performed before and after installation/removal of a package, then remove it from the database of installed packages.

mv /var/lib/dpkg/info/PACKAGE.* /tmp/
dpkg --remove --force-remove-reinstreq PACKAGE

Source: http://www.piprime.fr/1480/manually-rem … an-ubuntu/

Source: http://www.iasptk.com/ubuntu-fix-broken … -solution/

Source: https://www.rosehosting.com/blog/how-to … -debian-9/

Last edited by Psud0nym (2018-10-13 20:24:52)


Learner of new ideas
Retired Computer Technician
US Army 2001-2006

Offline

#2 2018-10-10 16:07:21

golinux
Administrator
Registered: 2016-11-25
Posts: 3,336  

Re: Correcting Broken Packages

Please use code tags.

Offline

#3 2018-10-10 16:25:45

Psud0nym
Member
From: Villa Rica, Georgia, USA
Registered: 2018-03-23
Posts: 6  
Website

Re: Correcting Broken Packages

I think corrects the tags you mentioned?


Learner of new ideas
Retired Computer Technician
US Army 2001-2006

Offline

Board footer