Terminally ill Dennis Hopper doesn’t want to kick the bucket until he boots the greedy wife he once lavished with expensive gifts, the movie icon’s pals say.

A longtime family confidant told The Post that Hopper is angry that wife Victoria Duffy is trying to bleed him for every last nickel — although he’s given her a ranch, museum-quality art works and a wardrobe of couture dresses.

“Dennis told me, ‘I’ve worked so hard to give Victoria everything she wanted, but it only fueled her appetite for more and more luxury,’ ” the source said.

Now the star, who is dying of prostate cancer, is desperately trying to hang on until his divorce from Duffy becomes final.

Hopper is at an LA-area hospital surrounded by his kids and pals — not to mention an ex-wife.

“I wish Victoria the best, but [I] only want to spend these difficult days surrounded by my children and close friends,” Hopper said in a statement released yesterday.

Hopper’s rep, Alex Hitz, said: “They’ve been having trouble and he wants peace and quiet.”

The 73-year-old “Easy Rider” star filed for divorce Thursday from Duffy, 41, to keep her from contesting his will, which leaves her only one-quarter of his estate.

They’ve been married for 13½ years and have a 6-year-old daughter, Galen.

Hopper and Duffy have been together for 18 years.

The actor has three grown children, Marin, Henry and Ruthiana. His first wife, Brooke Hayward, Marin’s mother, is reportedly at the hospital with him.

Meanwhile, Duffy has remained holed up at the couple’s home in the chic Venice neighborhood of Los Angeles.

Duffy is furious about being left only 25 cents on the dollar — the same payout spelled out in their prenuptial agreement, sources have told The Post.

The Hopper-Duffy relationship has been rocky for years and took a steep downward slide when she took Galen and disappeared for two weeks — when she was scheduled to visit him in Albuquerque where he was filming his TV series “Crash.”

“No one knew where she was,” said the source.

Duffy had been expecting much more than a quarter of Hopper’s estate — and was also fuming to learn she was not named executor of the will, a source said.

Sources close to Duffy’s camp insist the “Hoosiers” star is too drugged up to make any key decisions.

“He is mentally incapacitated from the enormous amounts of medication he is on given his state,” a Duffy confidant told The Huffington Post.

“It’s truly a tragedy. And sadly, it’s all about the money and who inherits what. This is about getting Victoria out of the will, nothing more, nothing less.”

Hopper’s associates say there’s nothing wrong with him mentally.

With Wire Services & David K. Li

richard.johnson@nypost.com

