[GLLUG] How to clear the Debian apt data without breaking the installed system?

Chris Bell chrisbell at chrisbell.org.uk
Wed Nov 4 21:44:36 UTC 2015


On Wednesday 04 Nov 2015 17:17:18 Andy Smith wrote:
> Hi Chris,
> 
> On Wed, Nov 04, 2015 at 12:59:59PM +0000, Chris Bell wrote:
> > I have Debian Stretch (testing) installed on a box which complains
> > that the hash sums for some index files on a local mirror are
> > incorrect, so it is unable to re-build the list for that mirror.
> 
> The actual error text would be useful.

W: Failed to fetch /mirror/debian/dists/stretch/main/source/SourcesIndex: Hash 
Sum mismatch

W: Failed to fetch /mirror/debian/dists/stretch/main/binary-
amd64/PackagesIndex: Hash Sum mismatch

W: Failed to fetch /mirror/debian/dists/stretch/main/i18n/Translation-enIndex: 
Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones 
used instead.

E: Couldn't rebuild package cache.

In fact none of these files exist in either the official mirrors or the local 
mirror (which is updated overnight every night). No complaints about missing 
files from the official mirrors.

> 
> > I can deselect the mirror in the /etc/apt/sources.list and do an
> > update, then reselect it, and the complaints return.
> 
> It sounds like the mirror may have corrupted data on it though.
> 
> > Can I safely delete a cache on disc without breaking the entire
> > installation?
> 
> Which cache exactly? In general it *should* be safe to delete
> anything under /var/cache given its purpose. More specifically it is
> safe to delete everything under /var/cache/apt/.

I did not want to delete a cache containing information about installed 
packages, just rebuild the cache(s) containing information about packages 
available. However there appear to be other problems occuring, with kernel 
modules now refusing to load, so I will probably just re-install (files that I 
need to retain are already symlinked to a /srv partition shared by the current 
stable system).

> 
> Cheers,
> Andy

Thanks for the reply.
Chris.




More information about the GLLUG mailing list