A "clean sweep" for a naval vessel refers to having "swept the enemy from the seas," a completely successful mission. It is traditionally indicated by hanging a broom from a mast or lashing it to the periscope of a submarine.
It is said the use of brooms in this respect originated during the 1650s, when the Dutch Admiral Maarten Tromp, after a decisive victory in the First Anglo-Dutch War, the Battle of Dungeness of 1652, hung a broom from his mast to indicate he had "swept the British from the seas" - his opponent Admiral Blake is said to have responded with the hoisting of a whip, indicating he would whip the Dutch into submission. However, both stories are legends; a broom in the seventeenth century indicated the ship was for sale.
The United States Submarine Service during World War II generally considered a patrol a "clean sweep" if the sub sank every target she engaged. Individual torpedoes might miss, and convoys usually had far too many ships for all to be sunk by a single boat, but these unavoidable inefficiencies did not mar a "clean sweep."
Few wide-ranging war patrols have been conducted since World War II, so commanding officers have taken other opportunities to fly brooms. For example, in the year 2000 the Military Sealift Command hung a broom from the flagpole yardarm outside their headquarters to symbolize its "clean sweep" of the Y2K bug on all the command's ships.
In 2003, under circumstances perhaps closer to the traditional context, after USS Cheyenne launched her Tomahawk missiles during Operation Iraqi Freedom, her commanding officer decided that placing all missiles on target, with no duds or failures, was a modern "clean sweep."
For decades, brooms have been flown by warships that successfully pass all elements of their sea trials. Examples include USS Ohio in 2005 and USS Virginia (SSN-774) in 2006.