  Starting from the most general formulation of stochastic
thermodynamics---i.e. a thermodynamically consistent nonautonomous stochastic
dynamics describing systems in contact with several reservoirs---, we define a
procedure to identify the conservative and the minimal set of nonconservative
contributions in the entropy production. The former is expressed as the
difference between changes caused by time-dependent drivings and a generalized
potential difference. The latter is a sum over the minimal set of flux--force
contributions controlling the dissipative flows across the system. When the
system is initially prepared at equilibrium (e.g. by turning off drivings and
forces), a finite-time detailed fluctuation theorem holds for the different
contributions. Our approach relies on identifying the complete set of conserved
quantities and can be viewed as the extension of the theory of generalized
Gibbs ensembles to nonequilibrium situations.
