Have you given the debugger a try?
Attempt to get the computer as hot as you can
Allow them to consume the unpleasant food or beverage you spilled inside.
I very recently had this issue, so I disassembled my laptop to search for the queen, which was within the hinge cover, and threw her out. I then used compressed air and a paintbrush to remove every single ant inside, and the ants never returned.
experienced this problem previously.
Although it’s an odd answer, this is what has worked for me.
Ants will not reside in an area with only one exit. Basically, you have to wait for them to depart while you do this.
Here’s the video: https://youtu.be/lzafphrqcMw?si=NteKgj3gYCWqcmu3&t=118