47

There are ants in my laptop keyboard again. It's happened before and ended up killing my productivity occasionally as the little critters suddenly show up from within the gaps of the keyboard. I had to bring it over to my uncle and he got rid of the ants, somehow, but I forgot to ask how he did it.

How can I get rid of them?!

I've seen this post on Electronics.SE but it got closed, so it didn't get any helpful answers even in the comments.

Unihedron
  • 1,040
  • 2
  • 12
  • 28

10 Answers10

45

There are already some good answers for how to get them out immediately. However, I have an alternate proposal: Wait until they leave on their own.

They're there because there's food in there. As others have suggested, this is probably food or drink from your meals. If you let them work, they'll clean it for you by removing every trace of food. Once it's clean, they'll leave. They're not likely to build a nest in there or anything and they shouldn't be able to get down into any sensitive circuitry and get fried.

Pop out the battery. Find where they're getting inside. Put the laptop next to the opening. Wait until they're done. Keep food and drink some reasonable distance away from the keyboard.


This is especially effective if you've spilled a sugary drink on the keyboard. They can get rid of all the stickiness.

Engineer Toast
  • 1,555
  • 10
  • 17
  • 7
    +1 for thinking outside the box. I've got a keyboard around here with a sticky control key (stays down when pressed). I should go find an anthill..... ;-) – RBerteig May 26 '15 at 23:19
  • 8
    So, if I spill something sugary on my keyboard in the future, I can just place it next to an anthill and it will be cleaned? Sounds awesome! This is probably even faster than disassembling the whole keyboard and cleaning the usual way. – Alex May 27 '15 at 07:17
  • 6
    It's how they clean bones at the Natural History Museum; after cutting off most of the meat, they leave the bones in a tank with beetles, and after a few weeks, they take them back out again, with all the flesh gone. – IQAndreas May 28 '15 at 06:55
  • If they can tolerate the temperature of the laptop while running, then they may be qute happy with using it as a nest, while foraging elsewhere for food. – mc0e Mar 04 '16 at 03:37
  • 3
    @mc0e I'm speaking from an antkeeper's perspective. In order to set up a nest ants need not only an appropriate temperature, but most importantly - areas with varying humidity. In the nest there have to be some places where moisture is high so they can keep their eggs and larvae. There is no way that they find these conditions inside a working laptop. – BuahahaXD Mar 04 '16 at 09:40
  • @BuahahaXD I've seen ants nest in a dry coke can under cover. That was in a relatively cool and damp climate though. Perhaps the limiting factors on where ants will nest vary with climate and species? – mc0e Mar 04 '16 at 13:28
  • @mc0e Have you seen them keeping the eggs and larvae there? Have you seen the queen? – BuahahaXD Mar 07 '16 at 10:34
  • @BuahahaXD In the coke can, yes. The ants are out of my laptop now, though I'm still working on getting them out of the monitor stand which has no sign of eggs. – mc0e Mar 07 '16 at 12:09
  • Actually it was only the live ones that were out of my laptop. Thousands of dead. – mc0e Mar 09 '16 at 13:01
  • Always use Naphthalene balls in your laptop Bags. This will avoid bringing any creepy insects and pests – hiFI Jul 23 '19 at 04:11
39

To remove almost anything, the simplest and most effective way is to use an Aero Duster. These blast compressed air in under the keys and into all the nooks and crannies and will safely leave your keyboard ant-free.

Of more importance is how to avoid ants deciding to colonise your laptop in the first place. You must have spilled something sweet in there at some point, so you may wish to avoid bringing food and drink anywhere near it.

If it is still attractive to ants, you can always pop it apart - all laptops are fairly easy to disassemble, as long as you know where the clips and screws are - and as all laptops are different, I'd suggest looking for a youtube video showing your particular one.

Additionally, when it isn't in use, put it back in a laptop bag. It will help.

Rory Alsop
  • 1,195
  • 11
  • 25
  • 12
    "[...]all laptops are fairly easy to disassemble[...]" --> try disassembling a 10 years old Toshiba or a 4 years old Sony Vaio. – Ismael Miguel May 27 '15 at 13:25
  • Yep - admittedly I had already been disassembling laptops for >10 years by that point so had had practice – Rory Alsop May 27 '15 at 13:33
  • 2
    I had to take one apart yesterday. And I only evaluated my life 400 times. It was a really old Toshiba. It was around 80 screws, 10 plastic bits, the screen and a tonload of parts everywhere and cables to connect. I tested it 5 times to be sure. The more recent Toshibas are also a little harder than 4 years old ones. But the worst, are the Sony Vaio! – Ismael Miguel May 27 '15 at 13:42
  • time consuming, but very straightforward and simple to do. – Rory Alsop May 27 '15 at 13:52
  • 3
    "all laptops are fairly easy to disassemble..." - https://twitter.com/Kirtaner/status/589164738870960128 – IQAndreas May 28 '15 at 06:51
  • 23
    Disassembling the laptop never was the problem. It's putting the damned thing back together that gets me. – corsiKa May 28 '15 at 14:53
  • 5
    @corsiKa Putting it back together's not the problem for me. It's the leftover screws that's the problem :P note to self: take more photos – Danny Beckett May 28 '15 at 21:40
  • FWIW with Lenovo W540, at least, be very careful, it's very easy to pop keys off when attempting to open the keyboard – nafg May 29 '15 at 08:09
18

I am from India. We have good sunlight almost year-round. If I were you, then I would simply put my laptop in the sunlight for 5-10 minutes. The ants will leave the keyboard because it will get too hot for them. Be careful with a plasma display - sunlight will harm it!

Alex
  • 3,979
  • 5
  • 25
  • 45
Kedarnath
  • 181
  • 2
  • 4
    Welcome to Lifehacks.SE! Could you please explain further why sunlight keeps away ants? – Alex May 26 '15 at 13:26
  • 6
    I would expect the whole thing to heat up relatively fast in direct sun light in a country like India. So it would get too hot for the ants and they would leave. – Nobody May 26 '15 at 13:30
  • I have no idea how this works , but I've been doing this for various things from containers to raw food items. –  May 27 '15 at 01:17
  • 1
    I'm not sure how healthy this is for your computer, though. You could end up harming the computer due to overheating. – holroy May 27 '15 at 09:05
  • 3
    holroy: It shouldn't be an issue. Heat generally is fairly fine for all computer parts up to somewhere >50C (ie >120F). What will cause a problems is if using it and the surface is at 50C, leading the CPU temp inside becoming >100C, leading to it crashing. Even then, odds are it will crash-out and shutdown without damage. Putting a computer in the sun, with it shut down should be no issue.

    There are 3 parts you have to worry about: Melting solder (Unlikely), Vaporising electrolytic capacitors, and I think most likely: Warping the Plastic Case.

    – Frames Catherine White May 27 '15 at 13:14
  • 1
    Some of the information contained in this post requires additional references. Please edit to add citations to reliable sources that support the assertions made here. Unsourced material may be disputed or deleted. Gonna need a source on it being hot in India. I don't buy it, and neither does SE. – basher May 27 '15 at 15:54
  • 4
    @basher >Gonna need a source on it being hot in India. Srsly? The roads are melting at the moment – mcalex May 28 '15 at 05:16
  • 1
    @mcalex I guess you're not very familiar with sarcasm? All the answers here are using personal experience as a reference, but this post is singled out as requiring additional references. I too wonder why that is. – Erwin Bolwidt May 28 '15 at 12:47
  • 3
    Heat is not good for battery life, so take that out too – nafg May 29 '15 at 08:11
  • 1
    Yes this answer easy anmong the others.. Because Ants cant tolerate high heat – Rookie007 Jun 09 '15 at 08:07
  • @nafg Agree that heat is not good for battery life. So you can remove the battery & then put laptop in sun light. & BTW I advised to put laptop in sun light for 5-10 minutes only. I dont think this is too much time that battery or laptop will become that much hot. – Kedarnath Jun 17 '15 at 05:09
  • I've got a Lenovo X220. I probably don't need the sun to heat it up, I just turned the laptop on and the ants came streaming out. But after half an hour they're still coming out. – mc0e Mar 04 '16 at 03:24
  • What I do is play a game for an hour or so to kick off the heat and fans to drive away the ants. but if I shutdown the laptop, they're back. So now I just keep it running. – ShahiM Jan 11 '17 at 08:20
8

One way is to lure them out with something sweet and then not let them go back inside the keyboard.

Another is to suck them out with a vacuum cleaner or blow them away with a vacuum cleaner on reverse. Don't forget to take out your keyboard from the notebook to avoid blowing something unwanted inside.

Also you might want to try freezing them. Don't attach the keyboard back too soon after taking it out of the freezer though to avoid short circuiting due to possible condensation due to temperature difference.

Extreme solution: put your notebook in a sealed container, vacuum air out and insert a deadly gas >:) One easy gas is butane from a regular lighter.

  1. Put the keyboard inside a plastic bag where you can see what's going on inside and have good control of the lighter.
  2. Suck the air out with your mouth, it should not be dangerous unless your keyboard already contains deadly gases or you tried bug poison earlier. In that case use a vacuum cleaner hose.
  3. Press the lighter button, but don't light it, obviously. Let out enough gas so that the plastic bag inflates visibly, and the proportion of the air to gas is small enough to seem deadly for the ants.
  4. Leave for a day to be sure, but in a place where kids, fire and direct sunlight can't reach it. Or it could result in a noticeable explosion. Better put the plastic bag inside a more protective container, like a jar, in case ants decide to run for their lives and eat through the plastic bag, resulting in a leak.
  5. After you're sure the ants are dead, let out the gas inside the bag in conditions that would not result in gas explosion. The ants inside are probably not holding onto anything, so you can shake them out of the keyboard and plug it back in.

Simply vacuuming air out may not be effective because the ants are pretty small and who knows how long it would take for them to breathe through all the oxygen between the keys and the keyboard base. Saturating their air with a non-breathable gas should speed up the process sufficiently.

user1306322
  • 646
  • 1
  • 5
  • 10
  • 5
    Do you have some kind of dark Nazi past? That evil smiley scared me... – Alex May 27 '15 at 07:22
  • 3
    Remove the battery before attempting this so that there won't be a follow up question of "How do I get charred ants out of my laptop?" – GuitarPicker May 27 '15 at 15:54
  • Umm, I'm talking about keyboard removed from the rest of the notebook exclusively, and there is no step involving prolonged high temperature treatment of the keyboard. There should not be any charred ants if you follow this procedure. – user1306322 May 27 '15 at 16:25
  • 1
    I can imagine small fire blasts coming from beneath the keyboard keys as you later run some demanding programs on the laptop which causes it to overheat. – Praxis Ashelin Jun 01 '15 at 11:40
3

Cut off their air/water/food, and they'll die. Just put your laptop in a sealed plastic bag for a couple days. A 2-gallon Ziploc freezer bag should do the trick.

enter image description here

*This only works if you can go without a computer for that long.

BrettFromLA
  • 11,541
  • 8
  • 30
  • 51
  • 8
    But then the OP will be posting "How can I remove dead ants from my laptop keyboard?" soon. – Captain Obvious May 31 '15 at 07:52
  • Hahaha true! That compressed-air canister idea will probably do the trick. – BrettFromLA Jun 01 '15 at 03:44
  • Even without doing this, I have so many dead ants under my keys that some of them are failing to work, and I'm having to take the caps off to clean them out properly. I just removed 30 or so ant bodies from under the enter key. There's no way compressed air could get them out from inside the hinge. – mc0e Mar 09 '16 at 12:58
2

I just read in Consumer Reports that ants hate cinnamon. Maybe a sprinkle of it would help. I have to agree with the other commenters though that making sure that you're not putting food in your keyboard is the best option. I know that you can buy plastic keyboard covers for just that purpose.

hotplasma
  • 71
  • 3
1

My wife discovered something that most ants loathe and detest. They will go to any lengths to avoid it and escape it. They will not go near it.

All you do is put a TINY amount on, in, or near any thing or area where ants are and… They're gone.

She first noticed its effect on tiny black ants in a bathroom and then with tiny pharaoh ants.

What is this magic ant repellant? CHANEL™ Body Powder.

Try a pinch on a sheet of facial tissue and put in in a plastic bag to coat the tissue lightly and evenly. You do not need much. After all, how much body powder does a tiny insect need for their tiny antibodies.

Put your infested piece on the tissue or lay the tissue on the keyboard. The ants will find their way out of any ports on the sides. Otherwise cover half of the keyboard so they can escape from the other side.

After the ants vacate the premises, the residue will keep the place void of them.

I'd love to watch. Good luck.

Stan
  • 14,169
  • 2
  • 22
  • 52
0

Diatomaceous earth. It is used in pest control, because it is actually comprised of tons of tiny edges, small enough that it does not hurt your (relatively) very thick skin, but will grate on insect exoskeletons, causing them to dry out.

Sources? Try google. There are many articles about how to use DE as pest control. In addition, you can sprinkle it on your garden (if you have one) to keep bugs away.

Aidan Tung
  • 11
  • 4
  • Let me understand this, you are adding sharp grains into your keyboard where they will destroy the contacts and jam the key mechanisms? – Chenmunka Jan 11 '21 at 18:14
  • I did not think this through, now that I really think about it, no, don't do this. should I delete this completely or edit to remove the 'use it here" part and keep it here as it is vaguely relevant? – Aidan Tung Jan 13 '21 at 03:50
0

Wash your keyboard in the top rack of an automatic dishwasher. I do not recommend using dish washing liquid...many have bleach in them that will lighten some of the color of the keyboard plastic. Also, don't use a cycle that dries with high heat. Let the keyboard dry completely before using.

-1

Usually Boric powder works when trying to get rid of ants. But using it on laptop keyboard I am not sure. But probably safer than bug sprays. (Make sure laptop is switched off and battery removed).

You can bait them out by placing some sweet/sugar stuff on your laptop trackpad. And smash to kill as they come out.

p.s. avoid eating or keeping food items near your laptop to avoid future infestation.

sankoobaba
  • 187
  • 5