What command can delete folders older than X days or X months?

I know a command to do the same with files, but what about folders (and all the files in it of course)?


The command you refer is find I suppose.

You should use the command -exec rm -r {} \; and add the -depth option.

The -r option to rm remove directories with all the content.
The -depth option tell find to elaborate content of folders before the folder itself.