The termination comes after nearly two years of clashes about which content should be available to children in libraries.