If you choose to machine wash your bag, remove every detachable strap. Then, turn the nylon backpack inside out (along with the pockets) before putting it inside a laundry sack. Throw it inside the washing machine with cold water and mild detergent and rinse thoroughly. Let it air dry.
Some nylon backpacks need special care, a.k.a. hand washing. The same procedure goes. But instead of using the machine, you carry on using a toothbrush on hard to remove stains and soft cloth of mesh areas. Rinse properly before hanging to air dry.