5

I have moreutils installed which provides /usr/bin/parallel, which is not useful for me. If I now want to install the parallel package (GNU Parallel) I have learnt from this answer that it would rename the existing /usr/bin/parallel of moreutils to /usr/bin/parallel.moreutils.

I was wondering what would happen if the opposite is done. For example, I have the parallel package installed and later on someone uninstalls moreutils and then reinstalls it again, will it rename /usr/bin/parallel to /usr/bin/parallel.gnu or what name would it get?

And if it does the renaming, how to avoid that?

My current Ubuntu version is:

$ lsb_release -a
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 18.04.3 
LTS Release: 18.04 
Codename: bionic

I also use Ubuntu 16.04 on other machines.

dessert
  • 39,982

1 Answers1

2

Ubuntu 18.04 and later

If you install any one of the packages, it will provide /usr/bin/parallel. If you install both in any order, you will get

  • /usr/bin/parallel with GNU Parallel
  • /usr/bin/parallel.moreutils with moreutilsparallel

See: How can I install GNU Parallel alongside Moreutils on Ubuntu/Debian?

Ubuntu 16.04

It will not be automatically renamed. I can’t test it, but my guess is that either will the parallel package be removed or – worse – the file will be overwritten.

A workaround to prevent the moreutils package from being accidentally removed or installed is a hold:

hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.

sudo apt-mark hold moreutils

This will prevent any automatic installation, however it can easily be overridden with apt-get’s --ignore-hold flag.

A similar alternative (but maybe not so easy to override?) is pinning as explained in this answer to the relevant question How to forbid a specific package to be installed?.

dessert
  • 39,982