To clear the line-of-sight (LOS) on a window in a lidar system within a vehicle, ultrasonic transducers are physically attached to the interior surface of the window to remove debris. When debris is detected at the window, the ultrasonic transducers are directed to vibrate at an ultrasonic frequency thereby generating an ultrasonic wave which causes the debris to bounce off the window. In some scenarios, the ultrasonic transducers vibrate with a particular phase shift to generate a travelling wave that causes the debris to sweep across the window. Additionally, windshield wipers, spray from a nozzle, and/or a hydrophobic or oleophobic coating may be used in combination with the ultrasonic transducers to remove the debris from the window.