Remove old Directories

just a quick one-liner used to remove all subdirectories of /tmp/mydir/ that are older than 500 days:

find /tmp/mydir/* -maxdepth 0 -ctime +500 -type d -exec rm -rf {} \;