The USS Carl Vinson, a Nimitz class carrier, just completed its mid-life refueling and overhaul. This is a three year process, and cost $3 billion. Part of that involved reloading the nuclear reactors, which requires dismantling part of the ship, as does many of the upgrades and replacements done to electrical and mechanical systems. In effect, the ship is largely rebuilt, enabling it to serve for another 25 years.
The Vinson entered service in 1982, and is scheduled to retire in 2032. But this isn't the only time a Nimitz undergoes scheduled shipyard maintenance. During a half century of service, there are three other trips to the dry dock, and a dozen other shorter stays in the shipyard. But the midlife work is the most expensive, and takes the longest. All this is necessary to keep the carrier up to date in terms of technology, and deal with wear and tear. Other warships undergo similar periods of maintenance, but the nuclear boats all require the mid-life refueling. However, a new generation of naval reactors do not require a complex midlife refueling. These reactors are already being used in the Seawolf and Virginia class subs, as well as the new Ford class carriers.