"tear apart, cut open or off," c. 1400, rippen, "pull out sutures," probably from a North Sea Germanic language (compare Flemish rippen "strip off roughly," Frisian rippe "to tear, rip;" also Middle Dutch reppen, rippen "to rip") or else from a Scandinavian source (compare Swedish reppa, Danish rippe "to tear, rip"). Likely most or all of them are from a Proto-Germanic *rupjan- (from PIE root *reup-, *reub- "to snatch"). "Of somewhat obscure origin and history; it is not quite certain that all the senses really belong to the same word" [OED].
The meaning "to slash with a sharp instrument" is from 1570s. Intransitive sense of "be torn or split open" is by 1840. Related: Ripped; ripping. In old U.S. slang, "to utter strong language" (1772), often with out; hence "break forth with sudden violence." The meaning "to move with slashing force" (1798) is the sense in let her rip "allow something to go or continue unrestrained," an American English colloquial phrase attested by 1846.
At another time, when a charge was ordered one of the officers could not think of the word, and he shouted—'Let 'er rip!'—when the whole line burst out with a yell—'Let 'er rip!' and dashed in among the Mexicans, laughing and shouting this new battle cry. [from an account of Illinois volunteers in the Mexican-American War, in the Pensacola Gazette, March 29, 1851]
In garments we rip along the line at which they were sewed ; we tear the texture of the cloth; we say, "It is not torn; it is only ripped." More broadly, rip, especially with up, stands for a cutting open or apart with a quick, deep strike: as, to rip up a body or a sack of meal. Rend implies great force or violence. [Century Dictionary]
"small sack," c. 1200, bagge, probably from Old Norse baggi "pack, bundle," or a similar Scandinavian source. OED rejects connection to other Germanic words for "bellows, belly" as without evidence and finds a Celtic origin untenable. In some senses perhaps from Old French bague, which is also from Germanic.
As disparaging slang for "woman" it dates from 1924 in modern use (but various specialized senses of this are much older, and compare baggage). The meaning "person's area of interest or expertise" is by 1964, from African-American vernacular, from jazz sense of "category," probably via notion of putting something in a bag. The meaning "fold of loose skin under the eye" is by 1867. Related: bags.
To be left holding the bag (and presumably nothing else), "cheated, swindled" is attested by 1793. Many figurative senses, such as the verb meaning "to kill game" (1814) and its colloquial extension to "catch, seize, steal" (1818) are from the notion of the game bag (late 15c.) into which the product of the hunt was placed. This also probably explains modern slang in the bag "assured, certain" (1922, American English).
To let the cat out of the bag "reveal the secret" is from 1760. The source is probably the French expression Acheter chat en poche "buy a cat in a bag," which is attested in 18c. French and explained in Bailey's "Universal Etymological English Dictionary" (1736), under the entry for To buy a pig in a poke as "to buy a Thing without looking at it, or enquiring into the Value of it." (Similar expressions are found in Italian and German; and in English, Wyclif (late 14c.) has To bye a catte in þo sakke is bot litel charge). Thus to let the cat out of the bag would be to inadvertently reveal the hidden truth of a matter one is attempting to pass off as something better or different, which is in line with the earliest uses in English.
Sir Joseph letteth the cat out of the bag, and sheweth principles inimical to the cause of true philosophy, by wishing to make great men Fellows, instead of wise men ["Peter Pindar," "Peter's Prophecy," 1788]