How to get stains completely out of carpet?
Place carpet in dumpster.

Install new carpet. 

Or something other than carpet where you have been prone to dropping food on it - sheet vinyl or some other easily cleaned surface.

A carpet cleaning machine may or may not work on any given stain, thus, this is the only sure-fire way.