Porcupines breed in autumn, and after a 7-month gestation period usually produce 1 offspring in spring. Although young are capable of eating vegetation within a week after birth, they generally stay with the female through the summer. Juvenile survival rates are high.
Porcupines are active year-round and are primarily nocturnal, often resting in trees during the day. They favor caves, rock slides, and thick timber downfalls for shelter. Although they spend a great deal of time on the ground, they are good climbers. When cornered by a predator, they will try to get away. If cornered, a porcupine will erect its quills, turn its back to the predator, and lash its tail. Quills are weakly attached to the porcupine and come off easily, often penetrating the predator’s skin. A porcupine does not shoot its quills.
Porcupines often live in coniferous and mixed forests. They wander widely and can be found in cottonwood stands and even deserts and alpine tundra.
Porcupines eat herbaceous plants, inner tree bark, twigs, and leaves, with an apparent preference for ponderosa pine, aspen, willow, and cottonwood. They prefer trees with thin, smooth bark over those with thick, rough bark. Porcupine feeding is frequently evident and has considerable impact on the cottonwood stands of western river bottoms. Their diet shifts with the season: in summer they eat berries, grasses, leaves, roots, stems, and seeds; in winter they eat evergreen needles and the inner bark of trees.