1

Pardon this newbie question, but I've previously run into serious issues as I wanted to try other desktop environments other than the default one in Ubuntu, precisely because I didn't know how to completely remove some/all of them and get back to the default settings.

I think I ran into these issues because I didn't know which packages to remove as I didn't know which packages were installed at the first place. Commands like

sudo apt-get purge <package name>

still left some applications installed on my system that were originally installed by the original package.

I have a couple of questions here

  1. how do I list all the packages to be installed by installing a specific package and see which of these packages are already installed on my machine (if any)?

  2. I imagine purging only the new packages that were installed by this specific package would get things back to the default settings. Is that right? Is there an easy, quick, and effective way to get things back to the default settings (aside from backing up my data)?

1 Answers1

1

The basic command to show dependencies is

apt-cache depends <package> 

which will show you the dependencies (there is even a rdepends option to show the reversed dependencies).

You can add this to the @ByteCommander's suggestion to use simulate install to see which packages will be installed in your system:

apt-get install -s ubuntu-desktop

(no need to use sudo in simulated mode!)

But to really answer the question, no, it is not possible sometime to go completely back. A classical example is ubuntu-gnome-desktop (Gnome shell) and ubuntu-desktop (Unity). Their dependencies partly overlap --- for example:

[romano:~] % apt-cache depends ubuntu-desktop | grep seah
  Depends: seahorse
[romano:~] % apt-cache depends ubuntu-gnome-desktop | grep seah
  Depends: seahorse

...and the overlapping packages may have different configuration defaults.

You can approximate the thing you want by purging all the packages and reinstalling them --- but it can be really dangerous, because the intermediate step can be a non-functional system.

Even outside of the packages, sometime the DEs make changes in your home directory that can affect other DEs (and files in your home are not restored even using purge and reinstall). So if you want to check another DE, do that with a fresh new user.

My personal experience is that the "insulation" of the various desktop environments is not perfect at all; Unity and Gnome shell are the worst offenders (probably because they share a lot), with other it can be better --- I do not know.

Rmano
  • 32,167