# Fetch your latest N records
newest_n_records = Foo.find(:all, :order => 'created_at DESC', :limit => n)
# Then do:
Foo.destroy_all(['id NOT IN (?)', newest_n_records.collect(&:id)])
# Or:
Foo.destroy_all('created_at < ?', newest_n_records.last.created_at)