Select a spray bottle capable of long-distance firing. You'll want to stand as far as possible from the yellow jackets when you spray them. Of all the times a yellow jacket might sting, you're most likely to get stung while attacking its nest.
Mix 1 tablespoon of detergent and 2 cups of water. Alternatively, mix equal parts of water and liquid soap. Mint or peppermint soap is especially effective.
Fill the spray bottle with the mixture.
Stand as far as you can from the nest. If possible, stand close to a door so you can run inside if swarmed.
Spray the yellow jackets. The soapy water will weigh down their wings and keep them from flying. They'll fall to the ground and slowly asphyxiate.
Crush them with a shoe to make sure they die.
Knock down their nest with a broom or a stick. Crush the nest before disposing of it.