Avoidance behaviour enables woodlice to escape suboptimal environmental conditions and to mitigate harmful effects of pollutants. However, several studies have shown that at least in some woodlice species the tendency to aggregate can lead to suboptimal responses as the between-conspecific attraction can outweigh the aversive stimuli. The present study evaluated the influence of gregariousness on the behaviour of Porcellio scaber in a heterogeneously polluted environment. The hypothesis was that the tendency for aggregation outweighs the tendency for exploratory activity, therefore animals in groups will be less active. Consequently, this will affect their avoidance of polluted environmental patches. To test this hypothesis, isolated individuals or pairs of individuals were monitored in free-choice arenas where animals could select between uncontaminated and pyrethrin-contaminated soils. Animals were video recorded for 3 h in darkness using infrared light and analysed for avoidance behaviour and locomotor activity. In general, isolated animals were more locomotory active and avoided the contaminated soil more than paired animals. It can be concluded that aggregation behaviour suppresses exploratory behaviour and consequently also the avoidance of polluted environments. This should be accounted for when interpreting results of avoidance tests with groups of gregarious animals, which may underestimate the effect of pollutants.