Image caption Leo Apotheker was rumoured for some time to be planning to exit HP's traditional hardware business

Hewlett Packard has confirmed plans to stop making PCs, tablets and phones, in order to refocus on software.

It has also emerged that the US company has agreed to buy UK software firm Autonomy for £7.1bn ($11.7bn).

HP added that it was considering selling its personal systems group, which includes the world's biggest PC-making business, and that it will discontinue its webOS devices.

The webOS operating system is used in its tablet computers and smartphones.

Refocus

The announcements mark a significant U-turn for the company, which announced in a March strategic review that it would integrate webOS into all of its future hardware.

HP had launched its Pre smartphone as a competitor to the iPhone and devices based on Google's Android operating system.

While there's a promise that Autonomy will be run as a separate business, with Mike Lynch still in charge, this still looks like a sad day for British technology - and for Cambridge in particular

However, WebOS failed to gain traction with reviewers, operators and retailers.

The decision to ditch the Pre, as well as its TouchPad tablet computers, comes despite paying $1.2bn (£727m) last year to buy up the technology through its acquisition of Palm.

There have been long-running rumours that chief executive Leo Apotheker, who recently joined from German rival SAP, wanted to refocus the company away from its traditional hardware business towards its smaller, but much more profitable, software lines.

The transformation planned by Mr Apotheker mirrors that of IBM, which dropped out of its traditional hardware business over the past decade.

"HP is recognising what the world has recognised, which is hardware in terms of consumers is not a huge growth business anymore," said Michael Yoshikami, chief executive of YCMNET Advisors.

"It's not where the money is. It's in keeping with the new CEO's perspective that they want to be more in services and more business-oriented."

On the sale of its PC business, HP said it "will consider a broad range of options that may include, among others, a full or partial separation... from HP through a spin-off or other transaction".

Market rumours have previously named various private equity firms as being keen to buy parts of HP if a break-up of the company were to happen.