duplicate changes from updating cleanup script in dfsg-orig branch