I had only one purpose when I threw everything away to run this restaurant.

Literal

Everything [object-を] discard, this restaurant [object-を] run [of-の] purpose [topic-は] one-only was.

やる here is in its 'to run/operate (a business)' sense — a frequent informal alternative to 経営する or 営む, especially natural in spoken or memoir-style Japanese. The long clause 全てを捨ててこのレストランをやる is a single relative clause modifying 目的 'purpose' — 'the purpose for which (I) threw everything away to run this restaurant.' 捨てて as a backgrounding te-form attaches the drastic 'threw everything away' as a committed preliminary action. でした marks the statement as retrospective — typical of a memoir or interview quotation.