0

I was deleting some files in a directory and without noticing that there was rm typed, i typed clear to empty the terminal. But, that accidentally deleted the command. I have tried to reinstall it, but to no avail:

naveen@naveen-hp:~$ clear

Command 'clear' not found, but can be installed with:

sudo apt install ncurses-bin

naveen@naveen-hp:~$ sudo apt install ncurses-bin
[sudo] password for naveen:             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ncurses-bin is already the newest version (6.2-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
naveen@naveen-hp:~$ clear

Command 'clear' not found, but can be installed with:

sudo apt install ncurses-bin

naveen@naveen-hp:~$ 

I am using Ubuntu 20.04LTS with Gnome. How to restore that command now?

5
  • 1
    How'd you remove a file that can only be removed by root? You sure you didn't have a sudo in there with the rm or running as a root prompt? – Thomas Ward Dec 29 '20 at 16:13
  • this is a personal computer and I am the only user, who is also root – Naveen Kumar Dec 29 '20 at 16:16
  • 2
    then you're not running Ubuntu. root is disabled by default on Ubuntu. You should NEVER be using root as your primary account for ANYTHING. – Thomas Ward Dec 29 '20 at 16:18
  • @Thomas Ward But you can start a separate terminal as root to perform administrative work (I do this regularly instead prefixing every command with sudo) and accidentally delete something by typing a command in that terminal window. So the fact that he didn't use sudo doesn't imply he's not running Ubuntu. – raj Dec 29 '20 at 16:37
  • @raj you're not wrong (I do the same with my admin work too) but if you read OP's comments "I am the only user, who is also root" implies they're using root as their daily driver account which they shouldn't do. – Thomas Ward Dec 29 '20 at 16:39
4

sudo apt install --reinstall ncurses-bin should reinstall all the components, if you removed one.

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.