I once advised someone to remove a package that depends on ubuntu-desktop meta-package, if she didn't need it (EG: if one uses a different editor than gedit). Someone else said that doing so (removing gedit which will in turn remove ubuntu-desktop) could break things. Is this true? Are there any other potential problems?
Ubuntu – What are the downsides of removing ubuntu-desktop metapackage
package-management
Related Solutions
Removing cups
or ubuntu-desktop
won't leave your package state confused. Only --force-…
can do that.
ubuntu-desktop
roughly means “all the basic functionality an Ubuntu user on the desktop should have without having to look for it”. Printing is included in that. If you don't want printing, you're sacrificing functionality. You can still remove ubuntu-desktop
, but then it's up to you to make sure you know which of its dependencies you must keep.
If you're only limited in RAM and not in disk space, you don't have to remove CUPS, you can just not start it. Under lucid, rename /etc/rc2.d/S50cups
to /etc/rc2.d/K50cups
, and similarly in rc3.d
, rc4.d
and rc5.d
.
But you're not going to gain much by not running CUPS; it would start, and quickly get into the swap and never come back as long as you don't print, and it's less than 2MB anyway. If you're RAM-starved, the best you can do is really to ditch Gnome (I see nautilus at 30MB, gnome-panel at 13MB, nm-applet at 11MB... Some of this is shared, but compared with the Gnome stuff, the system daemons are peanuts.)
It's probably a result of how apt walks the dependency tree. Looking at the maven
package details, we see:
default-jre-headless (>= 2:1.7)
Standard Java or Java compatible Runtime (headless)or java7-runtime-headless
virtual package provided by default-jre-headless, openjdk-11-jre-headless, openjdk-8-jre-headless
If openjdk-8-jre-headless
is already installed, then the java-7-runtime-headless
dependency is fulfilled and apt doesn't need to install anything additional there.
On the other hand, if nothing satisfying java-7-runtime-headless
is installed, then apt will go first for default-jre-headless
, since none of the packages named for installation fulfills either dependency, and JDK 11 gets installed. Since otherwise the package fulfilling this dependency is buried in the dependency of another package, we have a Catch-22 when it comes to creating the list of packages for installation.
If you explicitly name one of the packages providing java7-runtime-headless
for installation, apt will work as you want:
# apt-get install --assume-no maven openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ca-certificates ca-certificates-java dbus fontconfig-config fonts-dejavu-core
java-common krb5-locales libaopalliance-java libapache-pom-java libapparmor1
libatinject-jsr330-api-java libavahi-client3 libavahi-common-data
libavahi-common3 libbsd0 libcdi-api-java libcommons-cli-java
libcommons-io-java libcommons-lang3-java libcommons-parent-java libcups2
libdbus-1-3 libexpat1 libfontconfig1 libfreetype6
libgeronimo-annotation-1.3-spec-java libgeronimo-interceptor-3.0-spec-java
libgssapi-krb5-2 libguava-java libguice-java libhawtjni-runtime-java
libjansi-java libjansi-native-java libjpeg-turbo8 libjpeg8 libjsr305-java
libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2
libmaven-parent-java libmaven-resolver-java libmaven-shared-utils-java
libmaven3-core-java libnspr4 libnss3 libpcsclite1 libplexus-cipher-java
libplexus-classworlds-java libplexus-component-annotations-java
libplexus-interpolation-java libplexus-sec-dispatcher-java
libplexus-utils2-java libpng16-16 libsisu-inject-java libsisu-plexus-java
libslf4j-java libsqlite3-0 libssl1.1 libwagon-file-java
libwagon-http-shaded-java libwagon-provider-api-java libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxi6 libxrender1 libxtst6
multiarch-support openssl ucf x11-common
Suggested packages:
default-dbus-session-bus | dbus-session-bus default-jre
libaopalliance-java-doc libatinject-jsr330-api-java-doc libservlet3.1-java
libcommons-io-java-doc libcommons-lang3-java-doc cups-common krb5-doc
krb5-user libasm-java libcglib-java libjsr305-java-doc liblcms2-utils
libmaven-shared-utils-java-doc liblogback-java pcscd
libplexus-cipher-java-doc libplexus-classworlds-java-doc
libplexus-interpolation-java-doc libplexus-sec-dispatcher-java-doc
libplexus-utils2-java-doc junit4 testng libcommons-logging-java
liblog4j1.2-java libnss-mdns fonts-dejavu-extra fonts-ipafont-gothic
fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
ca-certificates ca-certificates-java dbus fontconfig-config fonts-dejavu-core
java-common krb5-locales libaopalliance-java libapache-pom-java libapparmor1
libatinject-jsr330-api-java libavahi-client3 libavahi-common-data
libavahi-common3 libbsd0 libcdi-api-java libcommons-cli-java
libcommons-io-java libcommons-lang3-java libcommons-parent-java libcups2
libdbus-1-3 libexpat1 libfontconfig1 libfreetype6
libgeronimo-annotation-1.3-spec-java libgeronimo-interceptor-3.0-spec-java
libgssapi-krb5-2 libguava-java libguice-java libhawtjni-runtime-java
libjansi-java libjansi-native-java libjpeg-turbo8 libjpeg8 libjsr305-java
libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2
libmaven-parent-java libmaven-resolver-java libmaven-shared-utils-java
libmaven3-core-java libnspr4 libnss3 libpcsclite1 libplexus-cipher-java
libplexus-classworlds-java libplexus-component-annotations-java
libplexus-interpolation-java libplexus-sec-dispatcher-java
libplexus-utils2-java libpng16-16 libsisu-inject-java libsisu-plexus-java
libslf4j-java libsqlite3-0 libssl1.1 libwagon-file-java
libwagon-http-shaded-java libwagon-provider-api-java libx11-6 libx11-data
libxau6 libxcb1 libxdmcp6 libxext6 libxi6 libxrender1 libxtst6 maven
multiarch-support openjdk-8-jre-headless openssl ucf x11-common
0 upgraded, 78 newly installed, 0 to remove and 4 not upgraded.
Need to get 44.0 MB of archives.
After this operation, 138 MB of additional disk space will be used.
Do you want to continue? [Y/n] N
Abort.
Best Answer
Removing the meta-package usually will not be a problem until you try to upgrade your system, but I would advise against it. Removing gedit and some of the other standard applications can also be problematic - if other programs depend on them. It is best that you leave them in place unless you know what you are doing. If you want to build your own minimal custom system, try using ubuntu-minimal.