environment dependent bundle cleaning