leaving only the needed files