find /path/to/base -mindepth 1 -maxdepth 1 -type d -ctime +10 | xargs rm -rf
-find: the unix command for finding files / directories / links etc.
/path/to/base/dir: the directory to start your search in.
-type d: only find directories
-ctime +10: only consider the ones with modification time older than 10 days
-exec
\
;: for each such result found, do the following command in
-rm -rf dir1 dir2 dir3
https://stackoverflow.com/questions/13868821/shell-script-to-delete-directories-older-than-n-days