[scripts] update tree cleanup script for entropy