UB said it would return pounds 150m to shareholders no later than July next year after sealing the deal, which, the company says, should also enhance earnings.
Under the terms of the deal, PepsiCo will buy the rights to UB's "Nibbit" snack brand as well as its French snack business and a factory in Veume, Belgium. UB will in turn buy PepsiCo's French biscuit operation, Biscuiterie Nantaise, which makes France's favourite sandwich biscuit, "le BN".
UB is also selling two Australian subsidiaries which have fallen prey to an antipodean craze for Tazos, a Mexican-style biscuit made by PepsiCo. Both the Original Pretzel Company and the Smith's Snackfood Company, which are owned by UB, have lost market share because of the popularity of collectable plastic discs placed in Tazo snack packets.
UB said that after the pounds 150m had been returned to shareholders, it would use the remaining pounds 91m to reduce borrowings and invest in an unnamed "series of strategic initiatives".
Colin Short, UB's chairman, said: "Today's deal represents a very significant development for UB. It gives us a stronger business platform from which to drive for growth in our international biscuit operations and UK food portfolio."
The swap of assets follows a troubled year for UB which has seen it lose market share in its battles with PepsiCo. It also represents a climbdown for UB's chief executive, Eric Nicoli, who pledged in September that he would "see off" PepsiCo's challenge in Australia.
However, UB has avoided a mooted sell-off of its flagship British crisp brand, KP, which has also been slipping in popularity against Walker's crisps, owned by PepsiCo. Mr Nicoli admitted last month that KP could not keep pace with Walker's, which now holds a 50 per cent share of the market against just 5 per cent for KP.
Investors greeted news of the disposals with a sigh of relief, marking up UB's share price by 25p to 219p. UB's shares have underperformed both the sector and the market by almost 20 per cent this year.
The company said profits from its French, Belgian and Australian brands had suffered as a consequence of the strength of sterling. Sales of biscuits from Biscuiterie Nationale in France had also been hit.
The deal needs approval from regulators and from the shareholders of UB, who will be called to an extraordinary general meeting "as soon as is practicable".
Despite yesterday's share price rise, UB's equity still remains well below the 300p to 350p level it enjoyed before announcing gloomy results in 1995. It is now aiming to to boost its share of the own-brands market, the growth of which in the big supermarkets has hit sales of its branded products.