better way to purge unneeded stuff after upgrade