Report this

What is the reason for this report?

Failed to fetch https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/main/binary-amd64/Packages Bad header line

Posted on April 14, 2025

Hi all,

I’m running into some issue, when trying to upgrade my Ubuntu currently on 14.04 when running

sudo apt update && apt upgrade

Here is the error part

Err https://repos-droplet.digitalocean.com main/main amd64 Packages
  Bad header line
Err https://repos-droplet.digitalocean.com main/main i386 Packages
  Bad header line
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
W: Failed to fetch https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/main/binary-amd64/Packages  Bad header line
W: Failed to fetch https://repos-droplet.digitalocean.com/apt/droplet-agent/dists/main/main/binary-i386/Packages  Bad header line
E: Some index files failed to download. They have been ignored, or old ones used instead.

Appreciate any help or even advise. This came about when my droplet is blocked because it was spamming, and was advise to install clamAV. I tried but I believe that clamAV need me to upgrade my Ubuntu.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya, @kuancheeneel

If you would, please try running:

rm -rf /var/lib/apt/lists/*

Once ran, please try running apt-get update once again. Generally, that’ll solve the issue, as long as the repositories in your sources.list file are correct and have not been modified.

Also you’ll likely need to upgrade in stages (14.04 → 16.04 → 18.04 → 20.04 or 22.04) because Ubuntu doesn’t allow direct jumps across multiple LTS versions.

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.