diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 5826fa1b737..14e54413eb0 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -864,8 +864,8 @@ fetch_update() { echo "done." # Remove files which are no longer needed - cut -f 2 -d '|' tINDEX INDEX | sort > oldfiles - cut -f 2 -d '|' tINDEX.new INDEX.new | sort | comm -13 - oldfiles | + cut -f 2 -d '|' tINDEX INDEX | sort -u > oldfiles + cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u | comm -13 - oldfiles | lam -s "files/" - -s ".gz" | xargs rm -f rm patchlist filelist oldfiles