Use a bar groove tool and compressed air.
That’s the fastest and most effective way.
The bar groove collects sawdust, oil residue, and grit that can clog the oil port and ruin the chain. A dedicated bar groove cleaning tool (or a flat-head screwdriver if you’re in the field) scrapes out the packed crud. Then hit the groove and the oil port with compressed air to blow out the fine dust.
Don’t use water or solvents—they wash out the bar oil and can cause rust. Just scrape and blow. If you don’t have compressed air, a stiff wire (like a paperclip) works for the oil port.
Do this every time you refill the tank. Your bar will last longer and cut way better.