remove directories with json