apt-get upgrade: Segmentation faulty tree… 50%

I am getting

$sudo apt-get upgrade
Reading package lists... Done
Segmentation faulty tree... 50%

How do i fix this?

Asked By: zakkak

||

Clear the apt cache and try again

sudo rm /var/cache/apt/*.bin

you can also remove the cached archives with

sudo apt-get clean
Answered By: zakkak

I (and my company) use ubuntu/linux mint exclusively on all of our systems — production and workstations. I upgrade ONLY when a new LTS comes out, if at all. My backup server, for instance, (running a highly customized version of rsnapsnot) has not been upgraded for longer than its LTS was supported. (if it ain’t broke, don’t fix it) I say this just to add background to my answer.

I have a script which I run after I add a new repository and/or upgrade. It keeps things fresh and unbroken. I do a lot of funky things that are tuned to my own internal environment, but in a nutshell, this script does:

sudo apt clean
sudo apt autoremove
sudo apt update && sudo apt list --upgradable

The answer by zakkak, which I upvoted as well, gives the first command — which should, in fact, solve your issue. I’m trying to put his answer into the context of my larger "solution."

Answered By: David Lee Crites
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.