Linux wiping SSH history bash_history - clearing tracks

Mega Carder

Guru
BFD MEMBER
LEGEND
ULTIMATE
SELLER
SUPREME
MEMBER
BFD Legacy
Joined
Mar 14, 2025
Messages
1,348
Reaction score
15,574
Deposit
6,350$
If you want to copy/paste this into root, this will wipe your root out if you went in through sudo - then the next user.. basically copy below and right click, right click:
Code:
cat /dev/null > ~/.bash_history && history -c && exit


There is also this, which is similar, but not quite.
Code:
cat /dev/null > .bash_history; history -c

Now also keep in mind:
Code:
cd /home/;ls

You could also clear all user activity, by:
Code:
su <username>

Then run:
Code:
Code:
cd ~
cat /dev/null > .bash_history; history -c
exit

Keep repeating through all users.

That could also be automated, cba to write that atm.

RIP logs
 
Top Bottom