Cleaning the computer and its components

Updated: 07/13/2023 by Computer Hope
Dusty and dirty computer fan

Taking good care of your computer is important. Cleaning your computer, components, and peripherals helps keep everything in good working condition, helps prevent germs from spreading, and helps allow proper air flow. The picture shows an example of how dirty the inside of your computer case can get. Looking at this picture, it's immediately obvious that all the dust and dirt is going to prevent proper air flow and may even prevent the fan from working.

How often should I clean my computer?

The frequency of how often to clean your computer varies on different factors. To help you determine how often you need to clean your computer, we created the checklist below. Check each of the boxes below that apply to your computer's conditions to help determine how often to clean the computer.

Where is the computer located?
In a home environment.
In a clean office environment.
In construction or industry environment.
In school environment.
Computer environment
Have cat or dog in the same building as the computer.
Smoke in the same building as the computer.
Smoke next to the computer.
The computer is on the floor.
The room with the computer has carpet.
Eat or drink by computer.
Who uses it?
Adult (18 and older).
Young adults (ages 10-18) use computer.
Pre-teen (younger than 10) use computer.
More than one person uses computer.

With what's checked above, clean your computer every months.

General cleaning tips

Below are suggestions to follow when cleaning any computer components or peripherals and tips to help keep a computer clean.

  1. Never spray or squirt any liquid onto any computer component. If a spray is needed, spray the liquid onto a cloth.
  2. You can use a vacuum to suck up dirt, dust, or hair around the computer. However, do not use a vacuum inside your computer as it generates static electricity that damages your computer. If you need to use a vacuum inside your computer, use a portable battery powered vacuum or try compressed air.
  3. When cleaning a component or the computer, turn it off before cleaning.
  4. Be cautious when using any cleaning solvents; some people have allergic reactions to chemicals in cleaning solvents, and some solvents can even damage the case. Try always to use water or a highly diluted solvent.
  5. When cleaning, be careful to not accidentally adjust any knobs or controls. Also, when cleaning the back of the computer, if anything is connected make sure not to disconnect the plugs.
  6. When cleaning fans, especially smaller fans, hold the fan or place something in-between the fan blades to prevent it from spinning. Spraying compressed air into a fan or cleaning a fan with a vacuum may cause damage or generate a back voltage.
  7. Never eat or drink around the computer.
  8. Limit smoking around the computer.

Cleaning tools

Although computer cleaning products are available, you can also use household items to clean your computer and its peripherals. Below is a listing of items you may need or want to use while cleaning your computer.

  • Cloth - A cotton cloth is the best tool used when rubbing down computer components. Paper towels can be used with most hardware, but we always recommend using a cloth whenever possible. However, only use a cloth when cleaning components such as the case, a drive, mouse, and keyboard. Don't use a cloth to clean any circuitry such as the RAM (random-access memory) or motherboard.
  • Water or rubbing alcohol - When moistening a cloth, it is best to use water or rubbing alcohol. Other solvents may be bad for the plastics used with your computer.
  • Portable Vacuum - Sucking the dust, dirt, hair, cigarette particles, and other particles out of a computer can be one of the best methods of cleaning a computer. However, do not use a vacuum that plugs into the wall since it creates static electricity that damages your computer.
  • Cotton swabs - Cotton swaps moistened with rubbing alcohol or water are excellent tools for wiping hard to reach areas in your keyboard, mouse, and other locations.
  • Foam swabs - Whenever possible, it is better to use lint-free swabs such as foam swabs.

See our computer tools page for a list of other tools every technician should have.

Case cleaning

Why? Cleaning your case keeps the appearance of the computer looking new. While cleaning, if you see ventilation slots, these can be cleaned or cleared to help keep a steady airflow into the computer and keep all components cool.

Procedure: The plastic case that houses the PC components can be cleaned with a slightly damp lint-free cloth. For stubborn stains, add a little household detergent to the cloth. Don't use a solvent cleaner on plastics.

Make sure all vents and air holes are hair and lint-free by rubbing a cloth over the holes and vents. It is also helpful to take a vacuum around each of the hole, vents, and crevices on the computer. It is safe to use a standard vacuum when cleaning the outside vents of a computer.

If you are looking for steps on cleaning the inside of the computer, see the motherboard cleaning section.

CD-ROM, DVD, and other disc drive cleaning

Why? A dirty CD-ROM drive or other disc drives can cause read errors when reading discs. These read errors could cause software installation issues or issues while running the program.

Procedure: To clean the CD-ROM (Compact Disc Read-Only Memory) drive, we recommend purchasing a CD-ROM cleaner from your local computer retailer. Using a CD-ROM cleaner should sufficiently clean the CD-ROM laser from dust, dirt, and hair.

You can also use a cloth dampened with water to clean the tray that ejects from the drive. However, make sure that after the tray is cleaned that it completely dry before putting the tray back into the drive.

See the disc cleaning recommendation for further steps on cleaning each of your CDs.

CD, DVD, and other discs cleaning

Why? Dirty CDs can cause read errors or cause CDs not to work at all.

Procedure: Use a cleaning kit or damp clean cotton cloth to clean CDs, DVDs (digital versatile disc), and other discs. When cleaning a disc wipe against the tracks, starting from the middle of the disc and wiping towards the outer side. Never wipe with the tracks; doing so may put more scratches on the disc.

Cleaning a CD and DVD, and other disc directional cleaning


If the substance on a CD cannot be removed using water, pure alcohol can also be used.

Hard drive cleaning

Why? Computer hard drives cannot be physically cleaned. However, they can be cleaned with software utilities to help it run fast and efficiently. Utilizing these utilities prevent the hard drive from slowing down.

Procedure: See our basic troubleshooting section for your operating system steps to help improve the computer's performance.

Headphones cleaning

Why? Headphones and headsets can be used by many different people and may need to be frequently cleaned to help prevent the spreading of germs and head lice.

Procedure: If the headphones are plastic or vinyl, moisten a cloth with warm water and rub the head and earpieces of the headphones.


Library or school headphones should not be cleaned with any disinfectant or cleaning solvent since some people can have allergic reactions to the chemicals they contain.

Headphones that have cushions also have the availability of having the cushions replaced. Replacing these cushions can also help keep the headphones clean.

Finally, in regards to headphones spreading head lice. If different students use the same headphones, have students use their own headphones, place bags over the headphones, or using headphones that can be wiped with warm water after each use.

Keyboard cleaning

These steps are for cleaning a desktop keyboard. For laptops, see: How to clean a laptop.

Dust, dirt, and bacteria

Dirt and hair under a keyboard key

The computer keyboard is usually the most germ infected items in your home or office. A keyboard may even contain more bacteria than your toilet seat. Cleaning it helps remove any dangerous bacteria, fix or prevent stuck keys, and keeps the keyboard working properly.

Procedure: Before cleaning the keyboard, first turn off the computer or if you are using a USB keyboard unplug it from the computer. Not unplugging the keyboard can cause other computer problems as you may press keys that cause the computer to perform a task you do not want it to perform.

Many people clean the keyboard by turning it upside down and shaking. A more efficient method is to use compressed air. Compressed air is pressurized air contained in a can with a very long nozzle. To clean a keyboard using compressed air, aim between the keys and blow away all the dust and debris. A vacuum cleaner can also be used, but make sure the keyboard does not have loose "pop off" keys can be sucked up by the vacuum.

To clean the keyboard more extensively, remove the keys from the keyboard.

After the dust, dirt, and hair are removed. Spray a disinfectant onto a cloth or use disinfectant cloths and rub each of the keys on the keyboard. As mentioned in our general cleaning tips, never spray any liquid onto the keyboard.

Substance spilled into the keyboard

If the keyboard has anything spilled on it (e.g., pop, cola, Pepsi, Coke, beer, wine, coffee, and milk), not taking the proper steps can destroy the keyboard.

Procedure: Below is recommendations that help prevent a keyboard from becoming bad after something has spilled into the keys.

If anything is spilled onto the keyboard, turn the computer off immediately or at the very least disconnect the keyboard from the computer. Once done flip the keyboard over to prevent the substance from penetrating circuits. While the keyboard is upside down, shake the keyboard over a surface that can be cleaned later. While still upside down, use a cloth to start cleaning the keys. After the keyboard is cleaned, leave the keyboard upside down for at least two days allowing it to dry. Once dry, continue cleaning the keyboard with any remaining substance.

If, after cleaning the keyboard keys are sticking, remove the keys and clean below the keys and the bottom portion of the key.

Finally, if the keyboard still works but remains dirty or sticky before discarding the keyboard as a last resort try washing the keyboard in the dishwasher.

If, after doing all the above steps the keyboard still does not work, we recommend buying a new keyboard.

LCD/LED cleaning

Why? Dirt, dust, and fingerprints can cause the computer screen to be difficult to read.

Procedure: Unlike a CRT (cathode ray tube) computer monitor, the LCD (liquid crystal display) or LED (light-emitting diode) monitor is not glass and requires special cleaning procedures.

When cleaning the LCD or LED screen, it is important to remember to not spray any liquids onto the screen directly. Press gently while cleaning and do not use a paper towel since it can scratch the screen.

To clean the LCD or LED screen, use a non-rugged microfiber cloth, soft cotton cloth, or Swiffer duster. If a dry cloth does not completely clean the screen, you can apply rubbing alcohol to the cloth and wipe the screen with a damp cloth. Rubbing alcohol is used to clean LCD and LED monitors before it leaves the factory.

CRT monitor cleaning


This section is for CRT computer monitors. If you have a flat screen monitor, see the LCD/LED cleaning section.

Why? Dirt, dust, and fingerprints can cause the computer screen to be difficult to read.

Procedure: A glass monitor screen can be cleaned with ordinary household glass cleaner. Unplug the monitor power cord and spray the cleaner onto a lint-free cloth to prevent fluid from leaking into any components inside the monitor. Vacuum off any dust that settled on top of the monitor and make sure no books or papers are covering the air vents. Obstructed monitor vents can cause the monitor to overheat or even catch on fire.


We suggest only using a cloth dampened with water when cleaning non-glass monitors or any anti-glare screens. Using ordinary household glass cleaner on special screens, especially cleaners with ammonia, can remove anti-glare protection or other special surfaces.

Other good cleaning solutions

  • Microfiber Towels
  • Swiffer Dusters

Related information

Motherboard cleaning

Why? Dust and especially particles of cigarette smoke can build up and corrode circuitry, causing various problems such as computer lockups.


When inside the computer, take the necessary ESD precautions and try to avoid unplugging any cables or other connections.

Procedure: Our recommendation when cleaning the motherboard from dust, dirt, or hair is to use compressed air. When using compressed air, hold it upright to prevent any of the chemicals from coming out of the container, which may damage the motherboard or other components. Also, ensure when using compressed air that you always blow the dust or dirt away from the motherboard or out of the case.

Another good alternative to compressed air is a portable battery powered vacuum. Portable vacuums can effectively remove the dust, dirt, and hair from the motherboard completely and prevent it from getting trapped in the case.


Never use an electrically powered vacuum, as it can cause static electricity that damages the computer. When using a battery powered vacuum, keep it a few inches away from components to prevent damage and anything from being sucked into the vacuum (e.g., jumpers).


When cleaning the inside of the case, also look at any fans or heat sinks. Dust, dirt, and hair can collect around these components the most.

Mouse cleaning

Optical or laser mouse

Why? A dirty optical or laser mouse can cause the mouse cursor to be difficult to move or move erratically.

Procedure: Use a can of compressed air designed for use with electronic equipment, spraying around the optical sensor on the bottom of the mouse. Blowing air on the bottom of the mouse clears away any dirt, dust, hair, or other obstructions blocking the optical sensor.

Avoid using any cleaning chemicals or wiping a cloth directly on the optical sensor, as it could scratch or damage the optical sensor.

Optical-mechanical mouse (ball mouse)

Why? A dirty optical-mechanical mouse (mouse with a ball) can cause the mouse to be difficult to move, and cause strange mouse movement.

Rotate bottom of the mouse cover

Procedure: To clean the rollers of an optical-mechanical mouse, you must first remove the bottom cover of the mouse. To do this, examine the bottom of the mouse to see what direction to rotate the cover. As you can see in the below illustration, the mouse cover must be moved counterclockwise. Place two fingers on the mouse cover, push down and rotate in the direction of the arrows.

Once the cover has rotated about an inch, rotate the mouse into its normal position, covering the bottom of the mouse with one hand. The bottom should then fall off, including the mouse ball. If the cover does not fall off, try shaking the mouse gently.

Computer mouse with ball removed

Once the bottom cover and the ball is removed, three rollers should be visible inside the mouse. Use a cotton swab, finger, or fingernail to remove any substances on the rollers. Usually, there is a small line of hair and dirt in the middle of the roller. Remove as much of this substance as possible.

Once you have removed as much dirt and hair as possible, set the ball back in the mouse and place the cover back on.

If the mouse still has the same problems, repeat the above process. If, after several attempts the mouse is still having the same problems, your mouse has other hardware issues and should be replaced.


Cleaning your mouse pad with a damp cloth can also help improve a computer's mouse movement.

All types of mice

Why? To help keep the mouse clean and germ-free.

Procedure: Use a cloth moistened with rubbing alcohol or warm water and rub the surface of the mouse and each of its buttons.

Printer cleaning

Why? Cleaning the outside of a printer helps keep the printer's appearance looking good and if used by many different people keep the printer clean of germs.

Procedure: First, make sure to turn off the printer before cleaning it. Dampen a cloth with water or rubbing alcohol and wipe the case and each of the buttons or knobs on the printer. As mentioned earlier, never spray any liquid directly onto the printer.

Why? Some printers require the inside to be cleaned to help keep the printer running smoothly.

Scanner cleaning

Why? Flatbed scanners commonly become dirty with dust, fingerprints, and hair. When the scanner is dirty, the images may have distortions.

Procedure: Clean a flatbed scanner's surface by spraying a window cleaner onto a paper towel or cotton cloth and wipe the glass until clean. As mentioned earlier, never spray a liquid directly onto the component.

The same towel or cotton cloth can also be used to clean the outside of the scanner.

Miscellaneous cleaning steps

Below is a listing of miscellaneous computer hardware that's rarely used today, but kept on this page people working on older computers and need to clean these devices.

Floppy drive cleaning

Why? Dirty read/write heads on the floppy drive can cause errors during the reading or writing process.

Procedures: The floppy drive is cleaned two different ways. The first method of cleaning a floppy drive is to purchase a kit at your local retail store designed to clean the read/write heads on your floppy drive.

The second method of cleaning the floppy drive is only recommended for experienced computer users. Open the floppy drive casing and physically swab the read/write heads with a lint-free foam swab soaked in pure alcohol or trichloroethane. When performing these steps, be extremely careful when cleaning the heads to ensure that you do not lock them out of alignment causing the floppy drive not to work. To help prevent head alignment issues, use a dabbing motion lightly putting the swab on the head and removing it, don't perform a side-to-side motion with the swab.

Palm pilot cleaning

Why? Dirty touch screens can cause difficult navigation.

Procedure: To clean the PalmPilot screen, use a soft cloth moistened with rubbing alcohol and rub the screen and the casing of the palm pilot. It is not recommended to use glass cleaner as it could damage plastics over time.

SuperDisk and LS-120 cleaning

Why? Cleaning the SuperDisk and LS-120 prevents the drive heads from becoming dirty.

Procedure: Purchase the SuperDisk cleaning kit available through Imation. Using any other method voids the warranty on your drive.