Remove clean tmp

Back PR for #1358 to bring into 1.8.6