How Do You Delete Line History in Linux?
Contents If You Want to Delete a Particular Command, Enter History -D. to Clear the Entire Contents of the History File, Execute History -C. the History File...
Contents
If you want to delete a particular command, enter history -d
How do you delete entries in Linux?
To remove a single line from the history file, use the -d option. For example, if you want to clear a command where you entered clear-text password as in the scenario above, find the line number in the history file and run this command.
How do I clear bash history in Linux?
How to clear bash shell history command
- Open the terminal application.
- Type the following command to to clear bash history completely: history -c.
- Another option to remove terminal history in Ubuntu: unset HISTFILE.
- Log out and login again to test changes.