Score:1

Unwanted install with apt-get remove

in flag

When I run

sudo apt-get purge openjdk-8-jdk-headless

The application informs me that it wants to install some other packages or the form oracle-11-* etc.

But I just want to free space on my HD so I just would like to remove-only.

Is there a command for that?

Console output as suggested by the comments:

pi@RevPi35686:~ $ sudo apt-get remove openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  oracle-java7-jdk
The following packages will be REMOVED:
  openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless
The following NEW packages will be installed:
  oracle-java7-jdk
0 upgraded, 1 newly installed, 4 to remove and 158 not upgraded.
Need to get 53.0 MB of archives.
After this operation, 24.7 MB of additional disk space will be used.
E: You don't have enough free space in /var/cache/apt/archives/.
Pilot6 avatar
cn flag
It is unclear. Please post the full output.
ChanganAuto avatar
us flag
Unclear and very likely inaccurate. That would be a first if true.
user535733 avatar
cn flag
It happens. If you have a package apt-marked "manual" , and it has dependencies that require Java, then if you uninstall Java-A, the system will try to install Java-B so it still provides Java.
datahaki avatar
in flag
sorry for not posting the screen capture yet (the problem occurred on the machine of my colleague). so I will look for ways to remove the "manual" mark. (Again, the motivation is just to free space on the HD and "not to not break" the functionality.) Thanks!!!
datahaki avatar
in flag
console output was added.
es flag
Which release of Ubuntu you are using? `lsb_release -r`
Score:1
es flag

To get more space in /var/cache/apt/archives/ run sudo apt-get clean.

Apparently you have some PPA added offering Oracle Java as alternative Java engine; run apt-cache rdepends --important --recurse --installed openjdk-8-jre-headless to find out what is the reserve dependency. If there is none such dependency, you could try --no-install-recommends with apt-get purge. If there is a dependency, you could remove that, or disable the PPA offering Oracle Java.

Using sudo apt-get autoremove will remove unneeded dependencies, too.

datahaki avatar
in flag
thank you for the reply! we will try this solution asap.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.