Sharpen the chain on the saw—just clean it first
You can file the chain without taking it off the bar, but you do want to clean it before you start.
The whole reason people say to remove the chain isn’t because the bar gets in the way. It’s because a dirty chain will wreck your file. Wood dust and gritty pitch get packed into the gullets, and running a file through that mess dulls the file fast and leaves a rough edge on the cutter. So before you touch a file, brush the chain off. A stiff wire brush works, or hit it with some chain cleaner or penetrating oil and wipe it down. Just get the loose crud out.
Beyond cleaning, make sure the chain is tensioned properly and the brake is off so the chain moves freely. You want the cutters facing you on the bottom of the bar. File at the factory angle, and use a depth gauge guide if you know what you’re doing.
Removing the chain is only worth it if you’re doing a deep cleaning, replacing the bar, or the whole chain is due for a serious service. For routine sharpening, leave it on. Clean it, sharpen it, get back to work.
A clean chain is a sharp chain.
