How To Clear or Remove Linux Logins History
On Linux systems, there are three standard commands that show information about the most recently connected users: last, lastb and lastlog.
The output of these commands includes: login, time of last connection , IP address, port, etc.
To preserve anonymity, it is necessary to clear the history of recent connections.

Command Log Description
last /var/log/wtmp Lists successful login/logout history
lastb /var/log/btmp History of failed login attempts
lastlog var/log/lastlog List of the last connected users
To remove all the information about the last logged in users, you need to clear the logs:
# echo > /var/log/wtmp
# echo > /var/log/btmp
# echo > /var/log/lastlog