Portsnap – Corrupt Snapshot

I ran into a problem with portsnap on my FreeBSD box and just figured out how to fix it. There was little information on the problem online so I will share it in case anyone else encounters this problem:

/usr/ports/files/<hash>.gz not found — snapshot corrupt.

To fix it I did this as root:

rm -rf /var/db/portsnap/*
portsnap fetch
portsnap extract update

This removes the corrupt snapshot database and forces it to fetch an entirely new one, then continue the update as usual.

8 thoughts on “Portsnap – Corrupt Snapshot”

  1. I don’t think you need the update at the end
    of the steps — since you just did a fetch,
    portsnap extract should does it all, the
    ‘portsnap extract’ is implicitly also doing
    an ‘update’

  2. hi i`ve been trying to install portsnap for two days now lol my problem is when it extracts i get an error message every time then i delete portsnap files and start again but same error every time.
    Hope someone here have an idea of what my next step is

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.