title: Erlang is not getting uninstalled from Ubuntu 18.04
body: <p>I have a Ubuntu-18.04 aws instance. I have installed Erlang/OTP 21 [erts-10.1] in it following this link <a href="https://hostpresto.com/community/tutorials/how-to-install-erlang-on-ubuntu-16-04/" rel="nofollow noreferrer">https://hostpresto.com/community/tutorials/how-to-install-erlang-on-ubuntu-16-04/</a> but I am whenever I try installing ejabberd on the same instance I get the error like this </p>
  
  <pre>
  ubuntu@ip-172-11-11-11:~$ sudo apt-get install make gcc libexpat1-dev libyaml-dev  automake libssl-dev erlang  build-essential libncurses5-dev openssl zlib1g-dev libgd-dev libwebp-dev fop xsltproc unixodbc-dev -y
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  automake is already the newest version (1:1.15.1-3ubuntu2).
  build-essential is already the newest version (12.4ubuntu1).
  make is already the newest version (4.1-9.1ubuntu1).
  make set to manually installed.
  gcc is already the newest version (4:7.3.0-3ubuntu2.1).
  gcc set to manually installed.
  libncurses5-dev is already the newest version (6.1-1ubuntu1.18.04).
  libssl-dev is already the newest version (1.1.0g-2ubuntu4.1).
  openssl is already the newest version (1.1.0g-2ubuntu4.1).
  Some packages could not be installed. This may mean that you have
  requested an impossible situation or if you are using the unstable
  distribution that some required packages have not yet been created
  or been moved out of Incoming.
  The following information may help to resolve the situation:
  
  The following packages have unmet dependencies:
   erlang : Depends: erlang-diameter but it is not going to be installed
            Depends: erlang-eldap but it is not going to be installed
            Depends: erlang-ftp but it is not going to be installed
            Depends: erlang-tftp but it is not going to be installed
            Recommends: erlang-ic-java but it is not going to be installed
            Recommends: erlang-src but it is not going to be installed
            Recommends: erlang-examples but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.
  </pre>
  
  <p>So I decided to uninstall erlang using these commands:</p>
  
  <pre>
  sudo apt-get purge erlang*
  
  sudo apt-get remove erlang
  
  sudo apt-get remove --auto-remove erlang
  
  sudo apt-get purge erlang
  </pre>
  
  <p>But even after running them when I write <code>erl</code> on the cmd-prompt I get </p>
  
  <pre>
  Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
  
  Eshell V10.1  (abort with ^G)
  1> 
  BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
         (v)ersion (k)ill (D)b-tables (d)istribution
  </pre>
  
  <p>Where did I went wrong and how can I uninstall erlang completely now?</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>~$ dpkg -l 'erlang*'
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name           Version      Architecture Description
  +++-==============-============-============-=================================
  un  erlang         &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-abi-17. &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-appmon  &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-asn1    &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-base    &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-base-hi &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-common- &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-corba   &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-crypto  &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-debugge &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-dev     &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-dialyze &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-doc     &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-docbuil &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-edoc    &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-erl-doc &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-et      &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-eunit   &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-gs      &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-ic      &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-inets   &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-inviso  &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-manpage &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-megaco  &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-mnesia  &lt;none&gt;       &lt;none&gt;       (no description available)
  ii  erlang-mode    1:21.1-1     all          Erlang major editing mode for Ema
  un  erlang-observe &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-odbc    &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-os-mon  &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-parseto &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-percept &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-pman    &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-public- &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-reltool &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-runtime &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-snmp    &lt;none&gt;       &lt;none&gt;       (no description available)
  ii  erlang-solutio 1.0          all          A package to add repository.
  un  erlang-ssh     &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-ssl     &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-syntax- &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-test-se &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-toolbar &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-tools   &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-tv      &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-typer   &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-webtool &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-wx      &lt;none&gt;       &lt;none&gt;       (no description available)
  un  erlang-xmerl   &lt;none&gt;       &lt;none&gt;       (no description available)
  </code></pre>
  
  <p>'type erl' gives this output</p>
  
  <pre><code>erl is /usr/bin/erl
  </code></pre>