What is the historical evidence of people gagging, retching, dry heaving and vomiting during exorcisms? A pattern I've noticed across multiple live recordings of exorcisms from totally independent sources is that in all of them you see the individuals being exorcised have intense gags. Here are a few examples of this phenomenon:
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
M,
N,
O
(the links already include the timestamps of when people start retching). What I find interesting is that they are not vomiting food, they are just dry heaving, spitting out saliva at most, and this usually happens when the exorcist is commanding the alleged &quot;entities&quot; to leave the person, &quot;lift a curse&quot; or something similar. In fact, there appears to be a whole trend of &quot;online&quot; exorcists uploading videos of remote deliverances via Skype or other platforms, and it's very common to see people manifest and start retching and coughing at some point in the videos.
Here is a similar anecdote posted by U.S.Catholic on May 16, 2011:

After a decades-long absence, interest in demonic possession—and the ritual to
defeat it—is on the rise. For more than a decade, Frank, a software
consultant who lives near Silicon Valley, California has been haunted
by depression and rage. Searching for remedies to lift his dark mood,
Frank, 52, tried pills, therapy, even channeling spirits. Nothing
worked.
Three years ago, his wife handed him a book about demonic possession.
Written by a former priest active in charismatic Catholic circles, the
book presented scriptural arguments for the existence of demons and
offered advice to questions such as, “How do we know if an evil spirit
is really present?” and “How do I pray for deliverance?” Desperate for
relief, Frank decided, while jogging one night, to pray for
deliverance.
“If I had known what was going to happen, I would have picked a more
private place,” Frank says.
After reciting the recommended prayer, he doubled over, dry heaving,
by the side of the road. His lungs felt like they were leaping out of his chest.

So, is this just a recent phenomenon, or can we find evidence of retching, gagging, coughing, dry heaving and vomiting during exorcisms all throughout history?
I basically agree with Ken Graham's answer. However, based on some research by Kristen Herdman, it seems like the idea of vomiting during exorcisms is certainly pre-modern.
Research by Herdman
In a MA Thesis by Kristen Herdman (Herdman, 2016), Gregory of Tours (†594) is quoted a couple of times, giving instances of vomiting during exoricisms:

In chapter eight of the Vita patrum, Gregory describes such an
event in the life of Nicetius of Lyon:

Very recently three women coming from the land of Berry, tormented by demons, were on their way to the basilica of St. Martin, and they entered this church. Immediately they clapped their hands together and cried out that they were tortured by the power of St. Nicetius. They threw up out of their mouths I know not what foul substance, mingled with blood, and they were immediately freed from the spirits that had possessed them.



A similar event is described in Gregory’s account of the life of Nicetius of the Trevari:

God also gave [Nicetius] the grace of healing. As he was walking one day around the church of St. Maximin the bishop, in the fore court of which three possessed men rested, overcome by sleep after many convulsions. Seeing them fast asleep, he made over them the sign of the cross, and immediately they woke up, uttering great cries, and suddenly vomiting, they were delivered.


All emphasis mine. Herdman cites these examples on p. 32 from James, 1991. pp. 62 and 107-108 respectively.
She goes on to write:

The examples provided by Gregory have parallels in medieval visual art. In many images of exorcism, a demon is depicted as emerging from the mouth of the afflicted individual, drawn out by the power of the exorcist. In regard to this
imagery, Nancy Caciola writes,

The central element in accounts of demonic possession is the sense that the afflicted individual has incorporated a foreign being within herself... their exit point is the victim’s mouth, a detail that suggests the need for a specific bodily opening. … Seldom were unclean sprits envisaged as numinous forms wafting out the victim. Rather, they crawled out from an orifice: usually though not universally, the mouth.


A case can be made that vomiting (rather than other forms of manifestation) has a theological significance, so the actual historical occurrence of vomiting cannot be demonstrated beyond doubt merely by the report of Gregory (since the report may be theologically motivated), accordingly, Herdman states

The biological functions of the mouth make it a clear threshold between
the interior and exterior of the physical body. It is transformed into a passage by
breathing, eating, and even vomiting—the mouth allows matter to be taken in and
to be expelled. The latter of these functions becomes a classic hallmark of
possession throughout the Middle Ages and has even persisted into contemporary
horror films. In the late Middle Ages and into the Early Modern period, a
possessed person may be observed to vomit foreign matter, such as a great
quantity of pins or paper.

For this, she cites Levak, 2013, who writes:

A recurrent element in many narratives of possession was the vomiting or extrusion of alien objects. Pins and needles were the most common materials, but the list of ejected substances includes nails, glass, blood, pottery, feathers, coal, stones, coins, cinders, sand, dung, meat, cloth, thread, and
hair.

Herdman has plenty more to say, and I encourage you to give the referenced section of her Thesis a read. However, I wish to particularly emphasize the main theological theme associated with these vomitings:

When the former demoniacs vomit, the audience is assured that what was torturing the afflicted from the inside has been forced out.


vomiting is depicted as a physical purging closely associated with the expelling of the demon from the body.

Scripture
A possible (albeit partial) basis for oral expulsion of demons during exorcism is Revelation 16:13:

And I saw, coming out of the mouth of the dragon and out of the mouth of the beast and out of the mouth of the false prophet, three unclean spirits like frogs. (ESV)

Speculation about Dry-Heaving
Up to this point the discussion has centered on vomiting. However, what about dry-heaving? There are a number of points to consider.

Firstly, dry-heaving obviously accompanies vomiting. But which of the two is more notable and worth mentioning in passing? In a sense, the dry-heaving is simply part of the process of vomiting. It could be argued that a mention of vomiting therefore implicitly includes dry-heaving as well.
This is especially the case for foreign objects, which are not as easy to vomit up as simple bile, and may require additional dry-heaving beforehand.
Given the theological motivation to emphasize the expulsion of the demon: and thereby symbolically the expulsion of material (be it of human or foreign origin), it is not particularly surprising that dry-heaving was not recorded (even when assuming vomiting was an occurrence during historical exorcisms).
On the other hand, modern exorcisms are not &quot;independent&quot; of historical exorcisms, in the sense that beliefs and expectations about what will occur during an exorcism are going to be shaped by the cultural depictions of historical (and fictional) exorcisms. So it could be argued that many of these dry-heaving episodes which are not accompanied by actual vomiting are more self-induced (perhaps unconsciously).
Proper vomiting is not really possible without having food in the stomach, especially when dehydrated. So dry-heaving would be the alternative.
If the exorcist is explicitly requesting vomiting, then dry-heaving and gagging is the way it appears when someone is attempting to comply with that request.

I cannot offer a definitive answer on the question of dry-heaving, but all things considered it does seem somewhat suspicious when such a thing is not accompanied by actual vomiting proper in these modern cases. My perspective is that there may be a psychological factor at play (see point 4).

References
Caciola, N. (2003) Discerning Spirits: Divine and Demonic Possession in the
Middle Ages. Ithaca, N.Y.: Cornell University Press. p. 41.
Herdman, K. (2016). Effugatis Daemonibus: Possession and the Body in Gregory of Tours' Vita patrum. pp. 31-37.
Electronic Thesis downloaded from https://etd.ohiolink.edu/apexprod/rws_olink/r/1501/10?clear=10&amp;p10_accession_num=case1459539746
James, E. (1991) Gregory of Tours: Life of the Fathers. Liverpool University
Press.
Levack, B. P. (2013) The Devil Within: Possession &amp; Exorcism in the Christian West.
New Haven: Yale University Press. p. 9.