How to effectively clear your bash history

Discussion in 'all things UNIX' started by ronjor, Jun 6, 2016.

  1. ronjor

    ronjor Global Moderator

    Joined:
    Jul 21, 2003
    Posts:
    163,760
    Location:
    Texas
  2. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Well, even easier, use Bleachbit to clean up bash history and all other traces of trash, including Ubuntu Apt cache. Sometimes more than 1GB of space can be freed just by running Blachbit in user space and root mode.
     
  3. accessgranted

    accessgranted Registered Member

    Joined:
    Mar 10, 2010
    Posts:
    205
    history -c && history -w
     
  4. fblais

    fblais Registered Member

    Joined:
    Jul 31, 2008
    Posts:
    1,341
    Location:
    Québec, Canada
    What does the -w switch, please?
     
  5. accessgranted

    accessgranted Registered Member

    Joined:
    Mar 10, 2010
    Posts:
    205
    On certain distros the -w switch is needed to write the cleansed state into memory, otherwise you may be left with the history -c mention in the bash.
    Also, use parcellite to view and clear any clipboard content, even if you're a Bleachbit user.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.