Disk space issue after apt-get update

I did a system update with sudo apt-get update and rebooted. After the reboot an error came up showing that i'm out of disk space. was barly able to access my desktop. I checked the space util and noticed that there are 2 very large files (over 20GB) in the directory: /var/lib/apt/list/partial/

  • za.archive.ubuntu.com_ubuntu_dists_vivid-updates_main_binary-amd64_Packages.bz2 (21.2 GB)
  • security.ubuntu.com_ubuntu_dists_vivid-security_universe_binary-amd64_Packages.bz2 (21.2 GB)

I managed to delete them and rebooted the system and all was fine. Then I did an update again and the same issue occured again.

Is this a bug?

System info : Ubuntu 15.04 - Daily updated


Solution 1:

If you look, for example for your first file here, you'll notice that the size of these files is barely 100KB, so you have something pesky going on—probably a network failure or something like that. Have you tried to check the content of these monster files? Is the filesystem clean?

Try to remove all the cached packages:

sudo apt-get clean

Then repair the database:

sudo apt-get install -f 

Finally repeat the update and upgrade:

sudo apt-get update 
sudo apt-get upgrade 

Solution 2:

I've experienced this bug that made my computer runs very slow. At first I thought it's because the new ppa I've just added. But then I discover that it's a bug that has been confirmed in the launchpad: https://bugs.launchpad.net/ubuntu/vivid/+source/apt/+bug/1445239

It turns out there's a problem in the ServerState::HeaderLine() where it parses

Content-Range header:

Content-Range: bytes 587-600/601

And in HttpServerState::RunData() there's a code In.Limit(Size - StartPos); that returns a -1 hence infinite loop for the MaxGet.

Go check the thread for full info.

Launchpad user Anton Blanchard and the others have made a patch for the bug, but it's still in the dev distro of Willy Werewolf and waiting for the developers of Vivid to fix this problem.

For now I suggest to be careful when running the apt-get update and be standby to cancel it if the lists/partial folder gets to grown into the gigabytes size. Deleting the folder will temporarily fixed the problem for me. Or you could schedule a cron jobs for it.