Question Linux rm command no longer works after updating system

ajaz1986

Commendable
Oct 30, 2018
25
0
1,540
1
I often write to ramdisk which I've mounted at /mnt/ram/ and then delete the contents by cd'ing into /mnt/ram/ and then rm* but today I did sudo apt-get update and sudo apt-get upgrade -y and now my rm command no longer works. I get an error saying command not found. I tried sudo apt-get install coreutils but it's saying I'm on the latest version now.

Seems like it's been removed from the latest version of coreutils?

If anyone can assist me on how to fix this or another way of removing all contents of the ramdisk (without rebooting the system) that would be great.
 

ajaz1986

Commendable
Oct 30, 2018
25
0
1,540
1
Hi

What Linux OS are you using? I do not see a reason why it would be removed. try theses options


This command will check your system for issues with the last update

sudo apt-get install -f

If the above finds nothing than try

sudo apt remove coreutils

than

sudo apt-get install coreutils

see if that fixes it


I suggest reading this

https://www.linuxbabe.com/command-line/create-ramdisk-linux

Thanks for the detailed response, I will try as you suggested and get back to you.
I'm using Ubuntu 20.04.2.0 LTS
 
That's strange... "rm" resides in /bin/rm ("which rm" will tell you exact location), so it's very unlikely it was lost as a result of ramdisk operation. More likely, path to /bin was lost.

Next time this happens, execute "/bin/rm" (or what you got on your system) to check.
 
Reactions: ajaz1986

ASK THE COMMUNITY

TRENDING THREADS