Depends on a number of factors - age of patient, environmental factors, and state requirements typically the most important. If a patient is beyond the age of majority, many states have either a seven or five year retention period.
If the case of a minor, it is usually until the age of majority, plus the normal retention period (5 or 7 years). In the case of environmental situations, it may be for the life of the patient.
Some academic centers are now determining that they should keep records forever, but this is usually for teaching purposes, which wouldn't be a factor in a community setting.