Question: how to clear wtmp file in linux?
Answer: lastlog command. The lastlog command shows the most recent login of all users or of a given user. ... 
Task: Display last login information. Simply type the lastlog command : ... 
Task: Clear last login information by deleting /var/log/lastlog. Simply overwrite /var/log/lastlog file. ... 
last and lastb commands.