Depending on whether pepperoni is stored in the refrigerator or the freezer, it may last from a couple of weeks up to a few months. Pepperoni is mostly resistant to bacteria because it contains nitrites that stop it from growing, but care should still be taken to store pepperoni safely.
Dried sausages such as pepperoni can last 2 to 3 weeks in the refrigerator or 1 to 2 months in the freezer. Pepperoni should be stored in freezer wrap. In order to avoid bacteria growth on foods, always keep countertops, cups, bowls and utensils clean by washing them with soap and water. A fact sheet from Washington State University states that pepperoni lasts 4 to 6 hours at room temperature.
Use a clean fork or tongs instead of fingers when handling meats. If the pepperoni is being used on a sandwich, the sandwich can be made ahead of time and stored in a plastic bag designed for freezing. When the sandwich is taken out of the freezer and packed into the lunch, it stays cold longer. This is one way to avoid bacteria growth on the food. Ice packs and insulated lunch carriers can also keep the entire lunch cold. Proper storage is always important. Make sure that the packaging is dry and seals are closed.