script to purge unused views