In this paper, we propose and analyze a deterministic mathematical model for the control of typhoid fever. This model incorporates five effective control strategies, including vaccination, booster vaccination, personal hygiene, treatment, and bacteria sterilization, in order to effectively stop the spread of the disease in the population. The model consists of seven compartments, each representing a different stage in the disease’s progression: vaccinated, susceptible, carrier, infected, recovered, booster vaccinated, and bacterial. Using the next-generation matrix approach, we calculated the reproduction number , which measures the disease’s potential for spreading. Our stability analysis, using the Routh-Hurwitz criteria, revealed that the disease-free equilibrium point is locally asymptotically stable when is less than 1, among other conditions. This means that typhoid can be completely eradicated if the rate of secondary infection is kept below a certain threshold. Further sensitivity analyses were conducted to determine the key parameters that impact . Based on our findings, we formulated an optimal control problem and utilized Pontryagin’s Maximum Principle to determine the most effective strategy for controlling and eliminating the disease. Our results show that a combination of vaccination, booster vaccination, personal hygiene, treatment, and bacteria sterilization is the most optimal approach. With our comprehensive model and effective control strategies, we are one step closer to wiping out typhoid fever for good.