After the outbreak of the Peninsular War, Purvis was active in preventing the French capture of Cadiz and at one stage destroyed the city's seaward defences.
He was the grandson of Captain George Purvis of Darsham, Suffolk, MP for Aldeburgh and comptroller of the navy in the 1730s.
[2] At the withdrawal from the Mediterranean in late 1796, Princess Royal was paid off and Purvis given command of the 98-gun ship of the line HMS London with the Channel Fleet, serving at the blockade of Brest.
In 1803 he returned to service once more in the Napoleonic Wars, and spent a year in command of HMS Dreadnought until promoted to Rear-Admiral in 1804.
Purvis was present at Cadiz in 1810, when a storm blew several Spanish and Portuguese ships ashore where they were destroyed by French artillery fire.