This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Problem with removing packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Problem with removing packages" Watch "Problem with removing packages" New topic

Problem with removing packages

Ma Yao

Joined: Sep 13, 2011
Posts: 14
I got the problem when I try to remove the old JDK in Linux.

I tried rpm -e packagename
or rpm -erase
or rpm -erase --nodeps

I got the same exception:" rpm: arguments to --root (-r) must begin with a /"

can anyone figure out what shall I do? thanks
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3899

What is the distribution you have and What is the exact command you tried?

[How to ask questions] [Twitter]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033

You've got your command line options mixed up.

Either do "rpm -e packagename" or "rpm --erase" packagename (Note the DOUBLE dash!). Alternatively, "rpm --erase=packagename". All the same results.

When you only coded a single dash, the command line parser interpreted it as:

So it thought you'd specified an alternate install root ("rase"), which, as it noted, is invalid because the root path must be absolute, and therefore start with "/".

So the following command is actually valid, although I hope no one ever uses it!

An IDE is no substitute for an Intelligent Developer.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Problem with removing packages
It's not a secret anymore!