Different sets of silica aerogels (classical aerogels, partially dense aerogels, composite aerogels) have been studied in the objective to understand the mechanical behaviour of these extremely porous solids. The mechanical behaviour of xerogels and aerogels is generally described in terms of brittle and elastic materials, like glasses or ceramics. The main difference compared to silica glass is the order of magnitude of the elastic and rupture modulus which are 104 times lower. However, if this analogy is pertinent when gels are under a tension stress (bending test) they exhibit a more complicated response when the structure is submitted to a compressive stress. The network is linearly elastic under small strains, then exhibits yield followed by densification and plastic hardening. As a consequence of the plastic shrinkage it is possible to compact and stiffen the gel at room temperature. These opposite behaviours (brittle and plastic) are surprisingly related to the same kinds of gel features: pore volume silanol content and the pore size. Both elastic modulus and plastic shrinkage depend strongly on the volume fraction of pores and on the condensation reaction between silanols. On the mechanical point of view (rupture modulus and toughness), it is shown that pores size plays likely an important role. Pores can be considered as flaws in the terms of fracture mechanics and the flaw size, calculated from rupture strength and toughness is related to the pore size distribution.