In a sense, of course, the answer is simple, as Margaret Thatcher discovered: you put up a plausible challenger. Or there is the 'men in grey suits' scenario, the glass of whisky, the loaded revolver. But the first method depends on the hoped-for successor being able to stand, which might be difficult in Kenneth Clarke's case unless (as happened in 1975) a head of steam builds up behind someone else; and the second depends to some extent on the prime minister playing the game like, well, a gentleman.
Historically, the business of getting rid of a premier other than at a general election has seldom, if ever, gone like clockwork. Although prime ministers have invariably suffered from paranoia, in practice they have enjoyed much greater security of tenure than the ministers they have appointed and sacked at whim. When a leader has been pushed, the successor has sometimes been unexpected, or unexpectedly bad, or (as with John Major) both. But premature obituaries have outnumbered actual assassinations 10 to one; and actual conspiracies have been rare and generally botched.
For Major's enemies, history offers little encouragement. It was a cabinet plot that got rid of Asquith in 1916, but that was under the special conditions of a wartime coalition. Conservative MPs were responsible for the abrupt departure of Lloyd George in 1922, but there is no analogy with the present because Lloyd George was a Liberal, and his Tory supporters were simply terminating his contract.
Andrew Bonar Law, the 'unknown' Prime Minister who held office for only seven months in 1922-3, was also a sick one, and departed of his own volition. The next two premiers, Stanley Baldwin and Ramsay MacDonald, who alternated in office for 14 years, were never in danger from their parties. In 1931 MacDonald sacked his government, rather than the other way round, staying in office at the head of a 'national' administration. Both men carried on in office until their fading mental and physical powers made it obvious, even to themselves, that they could no longer do so.
Although the inter-war years were marked by industrial turmoil, mass unemployment and the rise of fascism, no prime minister apart from Lloyd George lost office except by choice or electoral defeat. Since 1939 the political pressures on premiers have been greater and there have been several sudden departures: yet none of them suggests that the process is easy, or its outcome predictable.
Apart from Thatcher, the most clear-cut case was that of James Callaghan, who failed to hold the House on a confidence vote by a margin of one in 1979, called an election, and lost it. However, Labour had been a minority government for three years and an election was due anyway within months. Callaghan's plight does not compare with Major's. It is much more like MacDonald's at the end of 1924, when the first minority Labour government had the rug pulled out from under it by the Liberals.
Three post-war premiers have gone at elections, stepping down or being forced out as party leader while in opposition (Attlee, Douglas-Home, Heath). Three others have gone because of old age (Churchill) or ill-health (Eden, Macmillan), though in each of these cases the decision was taken against the background of a clamour for their departure. Uniquely, Harold Wilson retired in 1976 at a moment of his own choosing, when neither ill nor old, and under no pressure.
Yet even with Eden and Macmillan, the departures were not forced, and a 'men in grey suits' dismissal, often described as the Tory way, has in reality never happened to a serving prime minister.
There is, however, one resignation of which Major should take note, and that is Neville Chamberlain's in May 1940. On that occasion, Tory rebels combined with the Opposition to turn a debate on a failed operation (Norway) into an indictment of the Prime Minister's war leadership. In the subsequent division, the government won by a large majority, but with 41 of its normal supporters voting against, and some 65 abstaining. There is no doubt that Chamberlain was constitutionally entitled to carry on; it is clear, moreover, that he wanted to do so, and hung on until the last moment ('like a very sticky piece of chewing gum', as Brendan Bracken put it). But within a couple of days he had gone and Churchill was kissing hands as his successor.
In some ways, Major's position today is weaker than Chamberlain's. Not only was Major defeated in the Commons on a key element in his policy, which never happened to the architect of appeasement; Chamberlain, unlike Major, was highly regarded in the House and the country. When Chamberlain appealed to his 'friends' in Parliament to support him, he had in mind the country squires on the back benches who had followed him through the pre-war battles over foreign affairs and who remembered him as an estimable health minister and Chancellor. Major, by contrast, has little personal following, and few MPs would die at the barricades for him.
What Major does have on his side, paradoxically, is the democratic method of picking a leader. 'Look, you elected me,' he can say, as Chamberlain never could, 'and I remain the legitimate leader until you reverse that decision.' Meanwhile, MPs go on holiday, tempers cool, the economy picks up. Would Churchill ever have been Prime Minister if the decision had been postponed until after the summer recess?
So Major may be around for longer than it is currently fashionable to think. Wilson, after all, survived innumerable attacks on his leadership in 1968-9, when things looked almost as bleak. And Thatcher before the Falklands was the most unpopular Prime Minister ever. But neither Wilson nor Thatcher suffered the humiliation inflicted on the Prime Minister last week. If Major does remain, he will certainly chalk up another prime ministerial record - as the bounciest indiarubber ball in political history.
Ben Pimlott is the author of Harold Wilson (HarperCollins pounds 20)