Gardenias should be pruned after they finish flowering, usually in late spring or early summer. Start by removing any dead or diseased branches. Then, trim back the remaining branches to maintain the desired shape and size. Make sure to use clean, sharp pruning shears to avoid damaging the plant. It's also important to prune lightly to avoid removing too many flower buds for the next season.