We use numerical MHD to look at the stability of a possible poloidal field in
neutron stars (Flowers & Ruderman 1977), and follow its unstable evolution,
which leads to the complete decay of the field. We then model a neutron star
after the formation of a solid crust of high conductivity. As the initial
magnetic field we use the stable `twisted torus' field which was the result of
our earlier work (Braithwaite & Nordlund 2005), since this field is likely to
exist in the interior of the star at the time of crust formation. We follow the
evolution of the field under the influence of diffusion, and find that large
stresses build up in the crust, which will presumably lead to cracking. We put
this forward as a model for outbursts in soft gamma repeaters.Comment: 11 pages, 12 figures, submitted to A&