How to delete the cache and autogenerated content from the command line?

How to delete the cache programmatically?