Backpacks can trap all kinds of odours inside because they are often made from fabrics that don't breathe well, such a nylon and polyester. A backpack can pick up odours from its surroundings, its contents, spilt liquids and even the wearer's perspiration. It might take some time and a little elbow grease, but you should be able to get that backpack smelling fresh again.
Read the backpack manufacturer's care instructions carefully to find out if it is machine washable and if you are able to submerse it in water. If you no longer have the instructions, contact the manufacturer.
Take everything out of your backpack, and open all pockets and compartments all the way. Turn the backpack inside out. Vacuum it thoroughly with a cornering attachment, especially in corners and along seams.
Let your backpack air outside in a breeze, or in a cool place, for at least a day.
Hand wash your backpack if the odour lingers. Use a damp sponge or cloth and a little mild washing powder. Use a scrub brush to really scrub all surfaces, inside and out, with the soapy water. Rinse the backpack thoroughly with clear, cold water and let it dry.
Soak your backpack If it still had a bad odour and if the manufacturer permits soaking. Let the backpack soak overnight in a tub filled with water, 1/2 cup of baking soda and a few drops of lavender essential oil (if desired).
Wash the backpack in the washing machine as a last resort, but only if the manufacturer permits machine washing. Wash the backpack alone using the gentle cycle. Remove any loose or detachable strings or ties before washing. Add 1/2 cup of white vinegar to the machine right before the final rinse cycle begins.
Let your backpack air-dry for at least a day.
If you are unable to soak or machine wash the backpack, try an enzymatic backpack cleaner, available at sporting goods stores. If your backpack has an oil-based stain, such gasoline, soak it in a tub with some water and 680gr. of regular Coca-Cola, then rinse in clear water. Spraying the pack with perfumed deodoriser will only mask the smell, not get rid of it.
Do not submerse the backpack in water, unless specified by the manufacturer, because it could ruin the waterproof coating. Do not dry-clean a backpack, unless specified by the manufacturer, because it could ruin the waterproof coating.