0

I am currently running Debian Jessie with the Xfce DE.

I recently decided to replace the Xfce window manager with i3. Running sudo apt-get remove xfcwm unfortunately caused a lot of very necessary software to be listed as "no longer required" because they were installed automatically with xfcwm; reinstalling xfcwm did not fix the issue.

I would like to know how I can list these packages as "required", or at least as not automatically installed. I tried using sudo apt-mark unmarkauto, but this only seems to work one package at a time, and there are simply too many packages for this to be a convenient solution.

  • 1
    I'm unclear if there actually is a problem here. If so, what is it? Virtually all the time, packages that were installed to satisfy dependencies are really not necessary. I can't think of an exception. Can you give me an example of "very necessary software" that you need that was automatically installed with xfce? In any case, you will need to specify the packages some way. You could write a script to loop over them and run apt-mark unmarkauto on each one individually, but again, take a moment to check there really is a problem. – Faheem Mitha Jul 24 '15 at 13:41
  • The software listed as "not required" includes thunar (my file manager), network-manager, lightdm and lightdm-gtk-greeter (my login manager), all the xfce4 setting managers, etc. I considered making a script to loop through them but I don't know what command outputs the "not required" packages. – Alessandro Power Jul 24 '15 at 15:17
  • You can pass as many packages as you like to apt-mark. How are you building the list of packages to mark as manually installed? – Gilles Jul 24 '15 at 22:59
0

I think you confused the window manager for the desktop environment :p.

I.e. that re-installing xfcwm didn't work, because when you removed it, it also removed the package for the DE. One of the dependencies for the DE package is its window manager. To install XFCE use the xfce4 package, and possibly xfce4-goodies. That would be the quickest way to get your familiar packages back. In current Debian you also have the option of tasksel, and the xfce-desktop metapackage.

  • This did not work; the packages are still listed as required. – Alessandro Power Jul 24 '15 at 19:07
  • xfce4 depends e.g. on thunar. Thunar will still be marked "automatically installed" but it will not be listed during other apt-get operations, nor removed by apt-get autoremove. See dep thunar etc at packages.debian.org/jessie/xfce4 ... if that's not the case then something is going very wrong :(. – sourcejedi Jul 24 '15 at 19:19
0

apt-mark showauto gives the list of packages which were automatically installed.

apt-mark manual marks the given package argument as being manually installed.

If you want all automatically installed packages to be marked as manually installed, you can feed the output from apt-mark showauto to apt-mark manual, one package name at a time.

However, I still don't think you really want to do that, and I don't recommend it. If there happen to be some packages that you want to be manually installed and which are currently installed, mark them one package at a time, don't mark the whole lot.

See man apt-mark for further information.

  • Unfortunately this is not what I want. There are undoubtedly many automatically installed packages that I still want listed as such. – Alessandro Power Jul 24 '15 at 19:06
  • @AlessandroPower Ok. In that case, I'm unclear what you want. Do you want only the packages that were automatically installed when installing xfcwm to be marked as manually installed? It wasn't completely clear from your question. If so, I suggest you be more explicit. – Faheem Mitha Jul 24 '15 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.