The term that I think you are looking for is called "deaccessioning" and Wikipedia has what I believe is a good page about it. Sometimes there are conditions, and the museum may have to go to court to be allowed to move forward (and a judge may not allow it).