Use a hook knife to dig out and remove old expansion joint material to a depth of 3/4 inch. This must be done carefully, even painstakingly, to avoid chipping or scratching bricks. Damaged bricks absorb water through cracks. This water freezes and thaws with the yearly weather cycles, and this results in the eventual decline of the wall.
Brush out any remaining crumbles of expansion joint filler or caulking with a stiff bristle brush. Pull out large clingy chunks of filler with needle-nose pliers. If the previous expansion joint was filled with specialized expansion joint filer, then this filler may be all you encounter in the joint. Or, the joint may have been filled with extruded polystyrene foam and a layer of caulk on top, in which case, you'll inspect the condition of the foam once the caulking has been removed. Very likely the foam is in good condition, although you may have damaged it when removing the caulking. If the foam is damaged, use the hook knife or utility knife and a T-Square to cut new strips of foam, 1/4 inch wide, and insert them in the space before proceeding to the next step.
Load the caulk or expansion joint filler material into the caulk gun, following the gun manufacturer's instructions, and snip off the tip of the tube with a pair of scissors. Test the gun by depressing the trigger and squirting the material onto a surface like a scrap paper or excess strip of foam board. This will show you the gun is working properly and help you get used to the flow of the material out of the tube.
Place the caulk gun into the expansion joint and depress the trigger to fill the joint. Start at the top and work your way down to the bottom. Fill the joint slowly to apply an even amount of material.
Scrape off the excess caulking or filler material with a paint scraper, trowel or drywall knife.