Index: usr.sbin/freebsd-update/freebsd-update.sh =================================================================== --- usr.sbin/freebsd-update/freebsd-update.sh +++ usr.sbin/freebsd-update/freebsd-update.sh @@ -2906,6 +2906,14 @@ sort -k 1,1 -t '|' $1 | tr '|' ' ' | while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do + if [ -e ${BASEDIR}/${FPATH} ]; then + if [ ${TYPE} = d ] && ! [ -d ${BASEDIR}/${FPATH} ]; then + rm -f ${BASEDIR}/${FPATH} + elif [ ${TYPE} = 'f' -o ${TYPE} = 'L' ] && \ + [ -d ${BASEDIR}/${FPATH} ]; then + rm -rf ${BASEDIR}/${FPATH} + fi + fi case ${TYPE} in d) # Create a directory