The only free and comprehensive online etymological dictionary of the Spanish language
ex, ex- (Preposition, Prefix) "former," "out (of)"

From Latin ex 'id.' From Proto-Italic *eks 'id.' From Proto-Indo-European *h1éǵhs "out."

Romance: Western Vulgar Latin: Asturian ex, Portuguese ex, Galician ex, Catalan ex, French ex, Italian ex; Eastern Vulgar Latin: Romanian ex-