The soiling of pig pens has important implications for animal welfare, health, workload, and environmental emissions of pig farming. This excerpt provides an overview of the historical reasons behind current production systems, of pen soiling prevalence and its importance. Possible strategies and specific suggestions on how to address pen soiling in current systems are described, based on an extensive review on pigs’ normal eliminatory behaviour.
Prior to the development of intensive pig farming, which started around 1950–1960 , pigs were generally kept in relatively small pens with straw. Nose rings were used to limit rooting activity in small outdoor fields, while outdoor access was partly seasonal. In summer, pigs could often dig their own wallow. Pigs could get dirty in these traditional environments, either from lying in faeces or mud .
In many European countries, the phrase “no more hunger” became a driving force after WW-II to provide plenty of affordable food for all. This led to the industrialisation and rationalisation of agriculture , focussing on enhancing production efficiency and a larger scale of production. For instance, in 1950, the Netherlands had 271,000 farms of which almost 179,000 farms had pigs with an average of 10.6 pigs per farm. In 2018, only about 4000 pig farms were left housing about 3100 pigs per farm .
From the mid-1970s onwards, however, adverse consequences emerged . It was a time when the term “factory farming” reached the wider public following the publication of Ruth Harrison’s book “Animal Machines”  and the Brambell Report .
Animal welfare concerns often relate to a perceived discrepancy between modern farming and some kind of ideal condition, which is considered to be more animal friendly, such as traditional farming, living in nature, or being kept as a pet . For pigs, the discrepancy manifested itself as highly stocked, dark, smelly, and barren pens without straw or outdoor access.
A crucial innovation in housing design was the use of perforated floors. Slatted floors for pigs were made of metal, plastic, or concrete. Such floors increase animal hygiene, and reduce material costs and labour The liquid manure, collected underneath the slats , was mechanically pumped out of the slurry pit. As a result, air quality deteriorated. In addition, it became virtually impossible to provide rooting substrates, as these would block the liquid manure system . Straw, however, is highly beneficial to pig welfare as it serves various important functions, including bedding comfort for resting (cushioning and thermal comfort), recreational value for rooting and manipulation, and dietary value by providing gut fill . The provision of inadequate enrichment materials has been a persistent welfare problem of intensive pig farming, leading, e.g., to tail biting and routine tail docking . Further welfare problems related to the use of hard slatted floors include claw lesions, bursitis , incidental casualties when pigs fall into the manure pit and barn fires .
In organic pig production, where straw is provided, one of the biggest problems is environmental impact , in that emissions are more difficult to control due to a larger living area with a larger emitting surface of solid and slatted floors, including the outdoor area 
A better way of dealing with pen soiling issues, esp. the design of a so-called pig toilet, could have major benefits to reduce the environmental impact of pig farming as well as improve pig welfare.
Jensen et al.  estimated growing pigs kept on partially slatted floors soiled the resting area in between 4% and 9% of pens, and 5–10% of pens required manual cleaning. The economic impact of pen soiling has not been estimated directly, but Renaudeau  observed that, in a hot tropical climate, pigs housed in a clean environment consumed more feed and grew faster compared to pigs housed in the dirty environment. Huynh et al.  observed an increase in feed intake and growth rate together with a reduction in pen soiling when pen floors were cooled. However, these effects were likely related to the improved thermal comfort and not to pen soiling by itself. Interestingly, Van der Meer et al.  showed that pigs kept under poor sanitary conditions (including soiled pens) showed reduced growth rates and a compromised health status (higher pleuritis scores at slaughter and an increased innate immune response and serum haptoglobin concentrations). Courboulay  indicated that pen soiling, especially in the case of sows, has been associated with urinary disorders, puerperal mastitis, and a 2.8 elevated risk of lameness, and that it may hamper welfare assessment and management (e.g., the detection of skin lesions).
Pen soiling probably also has a considerable and perhaps often underestimated impact on pig welfare. It is, by itself, an indicator of reduced animal welfare as it implies the presence of factors in the environment that override the pigs’ intrinsic motivation or natural tendency to keep the resting area clean and separate from the elimination areas. Such causal factors include overcrowding, heat stress, inadequate flooring, health problems, and disturbance from other pigs. In addition, pen soiling may lead to a further reduction in welfare when air quality, thermal comfort, skin condition, hygiene, and health status are adversely affected. Loose-housed sows, which were temporarily confined to stalls after feeding, held up for several hours, probably to avoid eliminating close to the feeding and resting area of the stalls (Herman Vermeer, personal communication). This indicates a certain level of motivation in these sows to avoid pen soiling. Another indication of this motivation derives from the observation that pigs will wallow in faeces or urine in the resting area at a higher ambient temperature than they would use outdoor wallows .
EU Directive 2008/120/EC  requires that pigs have access to a lying area physically and thermally comfortable as well as adequately drained and clean, which allows all the animals to lie at the same time. Furthermore, Commission recommendation (EU) 2016/336  specifies that farmers should consider cleanliness (together with enrichment provision, thermal comfort and air quality, health status, competition for food and space, and diet) as part of the risk assessment to reduce tail biting and the need for tail docking. Pen hygiene is thus also a legal requirement.
Lastly, reducing pen soiling is important to limit the impact of pig production on the environment as soiled pens may substantially increase ammonia and odour emissions . When pigs are housed indoors, ammonia emissions are affected both by the proportion of slatted floors and by the size of the soiled solid floor surface area . When pigs have outdoor access, e.g., in organic systems, the manure tends to be deposited in the outside yard. This may increase overall ammonia emissions (when urine and faeces are mixed, especially in manure pits under slatted outdoor yards), and leakage of other nutrients (if pigs eliminate on pasture or soil areas without adequate crop/animal rotation). These emissions from organic farming can sometimes even exceed the standards for regular pig farming . Similarly, Eriksen et al. found that fattening pigs on pasture carry a high risk of nutrient loss, and suggested the adoption of preventive strategies (decreasing stocking density and dietary nitrogen intake, opting for a seasonal production as opposed to a year-round one) .
In order to deal with pen soiling problems in existing systems, it seems sensible to recommend implementing preventive measures at an early stage. According to Larsen et al. , a change in lying behaviour in one single partly-slatted pen in a room, e.g., a reduced number of pigs lying on the solid floor and an increased number of pigs lying on the slatted floor, can be regarded as an early indicator of pen soiling.
Apart from measures addressing pen soiling directly (like using a slatted floor to let manure pass through), overall, among the most frequently suggested preventive measures are those aimed at improving (micro-)climatic conditions, e.g., monitoring ambient temperatures at the pig level, removing draughts, improving ventilation, checking spillage from the drinkers, etc.
Since pigs probably do not choose a specific place to eliminate, but rather choose the most comfortable place for resting, and hence will eliminate in the less comfortable area of the enclosure , pen soiling may be counteracted (1) by reducing the suitability of the designated elimination area to be used for other functions, especially for resting or thermoregulation, (2) by improving the suitability of other areas in the pen to be used for their specific function such as resting and activity, (3) by reducing the suitability of other functional areas to be used for elimination, and (4) by improving the suitability of the elimination area for elimination.
Since thermal comfort is a well-known factor affecting the pigs’ choice of resting area, it is generally recognised as the single most important factor to control pen soiling . Thermal comfort zones range from 32 °C for very young piglets to around 16–20 °C for pigs of 30–60 kg and 14–20 °C for finishing pigs and adult females . In the so-called thermal comfort zone, no additional energy is needed to maintain the balance between heat production, which depends on metabolism and heat loss, which depends on convection, conduction, radiation, and evaporation . Convection, conduction and radiation mainly depend on the temperature difference between the skin and the environment, while evaporation mainly depends on the water vapour pressure difference between inhaled and exhaled air and the respiration volume , and when the skin is wet also on the water vapour pressure difference between the wet skin and the environment. Since pigs cannot sweat, they, if possible, compensate this by wetting their skin with water or mud. When this is not possible, they depend on panting, seeking shade, drinking more water, lying down laterally on cooler surfaces (e.g., slatted vs. solid floor) without physical contact to other pigs, in order to cool down and/or reduce their feed intake to reduce heat production. When cold, pigs can avoid contact to the (cold) floor (e.g., lie sternally), seek contact with other pigs (huddle), increase muscular activity (e.g., by shivering), and increase feed intake. Thermal comfort can thus be a major determinant of where pigs will rest and eliminate. The main variables affecting thermal comfort include temperature, humidity, and velocity of the air surrounding the pig; temperature and insulation of the floor; and temperature of the surrounding materials (see, e.g., ).
Several additional recommendations can be given to prevent pen soiling in existing systems related to thermal comfort and pen design.
(1) The first is to reduce the desirability of the (intended) elimination area as a resting area. One example is the use of studs in the elimination area to prevent pigs from resting there. Aarnink et al.  reported reduced lying in the elimination area, reduced soiling of the solid floor, and reduced ammonia emissions with metal studs (cylindrical studs, 5 cm high, 2 cm in diameter, spaced at 20 cm) installed in the elimination area.
(2) The second more welfare-friendly approach is to improve the suitability of other areas in the pen to be used for their specific function, such as resting and activity, instead of reducing the (resting) comfort of the elimination area . When kept indoors, this could include, for example, providing enrichment materials in the activity area, installing partitions to help the pigs differentiate between different functional areas, and improving the comfort in the lying area. For example, Huynh et al.  found that at high ambient temperatures, the use of a floor cooling system embedded in the solid floor resulted in cleaner pens, fewer pigs lying on the slatted floor, and a better feed intake and growth rate. Similarly, water sprinklers resulted in a drop in temperature near the water nipples and less soiling . When bedding or rooting materials are provided, pigs will tend to eliminate away from them. In rearing systems with outdoor access, Vermeer et al.  observed that an outdoor rooting area resulted in improved cleanliness of the whole pen (although in some cases the rooting area was also used as a dunging area), leaving the straw-bedded indoor-area clean and dry. Additionally, Olsen et al.  found that in pens with an outdoor run, most dunging took place outside, away from the lying and roughage feeding area. Huynh et al.  found that providing an outdoor yard (2.5 × 2 m) to pig pens (2.5 × 3 m) containing groups of 5 pigs in a tropical climate reduced the number of eliminations in the resting area, and that adding an indoor wallow had a similar effect (especially when no yard was provided). Improving one type of comfort, e.g., cushioning in the lying area, might, however, also have drawbacks in other respects. For example, Savary et al.  observed that at higher temperatures, synthetic plates and straw in the bedding area resulted in more pen soiling because the pigs choose to lie in the elimination area, to cool down. This is also in line with Fraser , who demonstrated that pigs only showed a preference for straw bedding over concrete at low temperatures.
(3) The third approach to deal with pen soiling is to reduce the suitability of other functional areas as an area for elimination. Rearing pigs at high stocking densities poses a general obstacle for the separation of functional areas. So, in general, reducing high stocking densities could counteract pen soiling in existing systems. However, in some conditions, e.g., in young pigs, excessive space allowance in the lying area may increase the risk of pen soiling. In such cases, farmers may (temporarily) reduce the size of the resting area or increase the stocking density, even though this may not always be the most welfare-friendly strategy. Randall et al.  observed that in conventionally-kept finishing pigs, a stocking density between 120 and 130 kg/m2 resulted in a cleaner lying area as compared to both a higher and lower density. While overcrowding may block access to a separate elimination area away from other pigs, too much space in the assigned resting area may give pigs the (false) impression they have moved away far enough from the area used for resting . With abundant space in the resting area, pigs often defecate in unoccupied corners or against walls , and once a location has become soiled it may be more likely to be used for elimination in the future .
(4) The fourth and final way to steer eliminative behaviour is to make the intended elimination area more attractive as a dunging place, e.g., using olfactory, optical, and/or auditory cues. For example, contact with neighbouring pigs or even an open view to the surroundings may be used , as well as the temporal association between elimination and other behaviours, especially feeding and drinking. Hacker et al.  found that pens with closed partitions were cleaner than pens with open partitions, regardless of the water position, ambient temperature (up to 30 °C), and stocking density. In this study, closed pen partitions presumably reduced air drafts around the sleeping area and maintained a temperature gradient between the warmer lying area and the cooler (slatted) dunging area. Furthermore, open partitions in the slatted area may stimulate pigs to mark that area of the pen with dung, thus possibly indicating territorial limits to their neighbours, although there is no clear conclusion on whether pigs are territorial or not . Areas close to open partitions could also be uncomfortable as a lying area, due to a disturbance of resting behaviour by the presence or activity of pigs in the neighbouring pens (André Aarnink, personal communication), or because pigs like to use a closed pen wall to lie down . On the other hand, it is also noteworthy that closed partitions may provide a protected place for elimination, which may be preferred by the pigs. Therefore, the use of open or closed partitions may vary depend on the microclimatic conditions in the pen, on pen design and layout, and on the need to delimitate the resting area and/or the elimination area.
With respect to olfactory cues to improve the suitability of the elimination area, pen soiling may be prevented by placing excreta in the intended elimination area before pigs enter the pen , which is in line with the observation that young piglets tend to eliminate in the sow’s elimination area . However, to our knowledge, only one study has investigated inducing dunging behaviour in a specific area of the pen using faeces and urine collected from other pens , whereas no study investigated the use of other odorous compounds. Yu et al.  observed that urine was not effective (probably due to its high volatility), whereas a device containing faeces placed before the piglets’ introduction attracted the eliminatory behaviour of weaned piglets : In the group with the device, defecation occurred in the relatively small designated area (8.3% of the pen) at a ratio of 75–80%, whereas in the control group, this was 45–49%. The effect was increased when faeces was collected 3 days in advance and preserved in air. Perhaps, also, water can act as a visual, tactile, or chronological cue to elicit elimination. Under certain circumstances, e.g., multiple drinkers and thus limited activity in the drinking area, pigs may prefer to urinate in areas around drinkers, which are prone to spillage , especially as the two behaviours, drinking and elimination, are often performed in a close sequence  and as wet areas like wallows seem to elicit elimination . Huynh et al.  also found that an indoor water bath (wallow) in a tropical climate reduced elimination in the resting area, especially in pens without an outdoor yard, with pigs often defecating and urinating inside the wallow. Though wallows may thus facilitate eliminative behaviour, especially under warm conditions, other issues, e.g., hygiene, water use, and ammonia emissions, may prevent their application to reduce pen soiling in current commercial systems. In future system designs, however, e.g., a pig-toilet system, wallows may be feasible, perhaps even integrated in the toilet in order to accommodate the pigs’ natural elimination and thermoregulatory behaviour as well to help them deal with more extreme heat-stress conditions, e.g., related to climate change. If the supply of drinking water is insufficient or if pigs are disturbed in the elimination/drinking area, this may also motivate pigs to eliminate away from the drinkers . Without disturbance, however, water seems to facilitate elimination, probably also due to a temporal association with feeding and drinking. This may help to prevent pen soiling using pen design or management interventions. Hacker et al. , for example, reported that the farther away the drinker is from the lying area, the farther the dung, and the cleaner the pen. Ocepeck et al.  observed that the placement of drinkers outdoors compared to indoors resulted in less pen soiling (30% reduction in the likelihood of both urination and defecation on the solid lying area indoors). In addition, and in line with the observation that pigs deposit part of their excretions on paths between the resting and foraging areas , in organic sows, delaying the admittance to pasture for half an hour may increase the amount of manure on the paved area, and thus reduce the deposition of manure and mineral losses at pasture . It is, however, worth mentioning that delaying the admittance to pasture is not always permitted in organic pig production.
Although poorly addressed in the literature, flooring design in the elimination area may also help to reduce pen soiling. Floors should not be slippery so as to prevent posturing for elimination (Anita Hoofs, personal communication, Herman Vermeer, personal communication). In addition, other flooring qualities may also be relevant, e.g., in separating functional areas or reducing splashing of urine. Pigs may have preferences similar to horses, which have anecdotally been reported to avoid urinating on hard surfaces, preferentially selecting areas with more absorbent surfaces, such as soft soil, grass, or indoor bedded areas , possibly to avoid splashing of urine . Piglets have, furthermore, been observed to respond to a conspicuous change in the feature of the environment, such as being inside or out of the nest, to eliminate , and, although no studies investigated this aspect, it is likely that also in older pigs a well‐differentiated floor type in the dunging area may facilitate eliminative behaviour in the designated area, and thus reduce pen soiling. A similar effect may result from providing a step down into the dunging area. According to Randall et al. , this resulted in cleaner lying areas, particularly at the elimination end. Additionally, the use of a “bedding board” could not only hold the bedding in the lying area but also train pigs to step over the bedding board to eliminate in the designated area, as suggested by Fritschen and Muehling . Lastly, pen shape may play a role, with rectangular pens encouraging better dunging patterns than square pens , when the excreting area is located at one short side of the pen, creating a bigger distance between lying and excreting areas. It is not exactly known why this is the case. Perhaps, it allows pigs to orientate and find the elimination area more easily, or it may result from improved lying comfort, e.g., alongside the long wall, or a sense of safety, e.g., since deep pens allow for maintaining a larger distance from the walkway. Another possible explanation is that in a rather narrow deep pen, a better separation can be made between the lying and the elimination area, especially when feeders are placed at one of the short sides of the pen. This would help explain also why, in pens with trough feeding, pen soiling is generally a bigger problem, because the troughs are located on the long side of the pen. Recommending a rectangular pen shape, however, should not be taken too far as too narrow pens may again reduce the opportunities for the pigs to get access to the elimination area.
Overall, many of the presented measures for preventing pen soiling in existing systems would benefit from a certain flexibility in pen design (i.e., changing the position of feeders, drinkers, rooting areas, open/closed pen partitions, etc.) or even the pen’s hardware, barn layout, or business model (e.g., floor type, feeding system, sprinklers, outdoor access, pen shape, stocking densities, etc.). Existing systems often lack the required flexibility to pursue these solutions, and therefore the most feasible measures farmers may take are often limited, and can be summarized as follows:
(1) Be alert for early signs of pen soiling, especially by noting changes in resting behaviour, and take action at an early stage (e.g., by pen cleaning and providing sawdust in the resting area);
(2) Avoid excessive stocking densities, in order to facilitate the distinction between functional areas;
(3) Improve thermal comfort, especially in the designated resting area, e.g., by checking the ventilation system, reducing draughts, and optimising the microclimate (e.g., by floor cooling);
(4) When animals are allocated to a new pen, favour the correct distinction between elimination and resting areas (e.g., by wetting the designated elimination area and providing dry feed or sawdust on the floor of the expected resting area for at least the first few days) ;
(5) Remove (or limit) olfactory clues as much as possible by thorough pen cleaning before introducing a new group of animals. Alternatively, explore the possibilities to direct them towards the correct dunging area by using olfactory cues;
(6) Provide proper enrichment materials facilitating the use of functional areas, e.g., by enhanced synchronisation of behaviour (synchronised activity and rest), by stimulating activity in areas at risk of pen soiling, and perhaps adding lying comfort in the resting area (cushioning from bedding materials). For instance, providing some exploration material (fresh straw, roughage) or nutrition (e.g., grain, corn, lucerne) in the lying area at times appropriate for activity, e.g., during inspection of the pigs, in order to prevent the lying area from being used as an elimination area.