Question: I forgot my password and I decided to reinstall Ubuntu with the last version. Now, how can I get rid of the old version? I use VM Virtualbox as emulator.

I must say that I am and old COBOL developer and everything is new here for me.

Answer: 
Consider `xclip`, which is a command-line interface to the X clipboard, and is available with `sudo apt-get install xclip`.

You may have noticed that in Ubuntu, if you select some text and then press the middle mouse button, that text will get pasted into whatever input is in focus. `xclip` hooks right into that, so if you run `seq 10 | xclip -i` then middle-mouse somewhere, you'll paste the numbers 1 to 10. If you were to select my username then run `xclip -o | cowsay`, you'll get a cow saying the word "ymbirtt".
It can be done with emacs.

1. Open emacs
2. `Alt`-`X` + `term`: opens a terminal in a new emacs buffer
3. `Ctrl`-`C`+`Ctrl`-`J`: enter line mode (more details on the modes below)
4. Select the desired text
5. `Alt`-`W`: copy the text
6. `Ctrl`-`C`+`Ctrl`-`K`: go back to char mode
7. `Ctrl`-`Y`: paste

**Remarks on line-mode and char-mode**

In char-mode, each character you type is sent to the terminal (like in any terminal) and most emacs shortcuts are disabled (to enable terminal shortcuts). In particular, don't be surprised if shortcuts to change the buffer do not work. To change the buffer, you must first enter line mode. In line mode emacs behave like in a normal emacs buffer. More details [here](https://www.masteringemacs.org/article/running-shells-in-emacs-overview).