Disk space issue after apt-get update

8,566

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.

Share:
8,566

Related videos on Youtube

Shawn Botha
Author by

Shawn Botha

Updated on September 18, 2022

Comments

  • Shawn Botha
    Shawn Botha over 1 year

    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

  • Shawn Botha
    Shawn Botha almost 9 years
    I've tried doing the "upgrade" afterwards, but i still get an error : Reading package lists... Error! E: Write error - write (28: No space left on device) E: IO Error saving source cache E: The package lists or status file could not be parsed or opened. As soon as i run the update command the 2 files gets rebuild by apt-get.
  • Carl H
    Carl H almost 9 years
    How much disk space do you have? Please edit your question to include the output of df -h.
  • Shawn Botha
    Shawn Botha almost 9 years
    After delete the 2 files i can run the : sudo apt-get update && sudo apt-get upgrade - command but it will not complete the upgrade due to the error