{"id":8677,"date":"2025-11-20T16:31:22","date_gmt":"2025-11-20T16:31:22","guid":{"rendered":"https:\/\/resizemyimg.com\/blog\/?p=8677"},"modified":"2025-11-20T16:39:10","modified_gmt":"2025-11-20T16:39:10","slug":"how-to-clear-bash-history-linux-mac","status":"publish","type":"post","link":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/","title":{"rendered":"How to Clear Bash History (Linux\/Mac)"},"content":{"rendered":"<p>In our increasingly digital world, privacy and data protection have taken on heightened importance. Whether you&#8217;re a system administrator, a developer, or a casual user, there are moments when you might need to remove your command history from your terminal. This is especially critical when you&#8217;re working on sensitive tasks, using production credentials, or sharing your machine with others. In Unix-like systems like Linux and macOS, the Bash shell conveniently stores your command history \u2013 but sometimes that convenience could also become a vulnerability.<\/p>\n<h3>TL;DR<\/h3>\n<p>If you&#8217;re using a Linux or macOS system and need to remove your command history for privacy or security reasons, you can do so using simple commands like <code>history -c<\/code> and clearing files like <code>~\/.bash_history<\/code>. It\u2019s important to understand where Bash stores your history and how it behaves during and after sessions. For a full wipe, you must clear both in-memory and on-disk history and ensure future commands aren&#8217;t logged inadvertently. Proceed with caution, especially on shared or production systems.<\/p>\n<h2>Understanding What Bash History Is<\/h2>\n<p>Bash maintains a history of executed terminal commands to improve usability and efficiency. By default, it stores this history in a file named <code>.bash_history<\/code> located in your home directory. This is exceptionally useful for quick recall of previous commands using the arrow keys or the <code>history<\/code> command. However, it&#8217;s also a potential security risk if you\u2019ve typed sensitive information like passwords, API tokens, or database queries into the terminal.<\/p>\n<h2>Why Clear Bash History?<\/h2>\n<ul>\n<li><strong>Security:<\/strong> Bash history might contain sensitive information like passwords, secret keys, or internal server commands.<\/li>\n<li><strong>Privacy:<\/strong> If others access your computer or your user account, they can see what you\u2019ve done in the terminal.<\/li>\n<li><strong>Clean Workflows:<\/strong> Developers working in shared or demo environments may want a clean slate for walkthroughs or presentations.<\/li>\n<\/ul>\n<p>Clearing Bash history isn&#8217;t simply a matter of removing a file. Bash stores history both in memory (during an active session) and on disk (after a session ends), so you\u2019ll need to address both.<\/p>\n<h2>Basic Methods for Clearing Bash History<\/h2>\n<h3>1. Clearing the Current Session History<\/h3>\n<p>To clear the current session\u2019s history from Bash\u2019s memory, run the following:<\/p>\n<pre><code>history -c<\/code><\/pre>\n<p>This command tells Bash to clear the current session\u2019s history list. However, this alone won\u2019t prevent the history from being written to <code>.bash_history<\/code> when you log out or close the terminal session.<\/p>\n<h3>2. Preventing History from Being Written to Disk<\/h3>\n<p>After running <code>history -c<\/code>, ensure the memory isn\u2019t dumped to disk by also running:<\/p>\n<pre><code>history -w<\/code><\/pre>\n<p>Or better yet, nullify the user\u2019s history file before exiting the shell:<\/p>\n<pre><code>cat \/dev\/null &gt; ~\/.bash_history<\/code><\/pre>\n<p>You can also combine clearing memory and clearing the file as follows:<\/p>\n<pre><code>history -c\ncat \/dev\/null &gt; ~\/.bash_history<\/code><\/pre>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"810\" src=\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command.jpg 1080w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command-300x225.jpg 300w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command-1024x768.jpg 1024w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command-575x431.jpg 575w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/black-steel-electronic-device-server-firewall-settings-screen-open-ports-configuration-linux-terminal-firewall-command-768x576.jpg 768w\" sizes=\"(max-width: 1080px) 100vw, 1080px\" \/>\n<h3>3. Exit the Session Cleanly<\/h3>\n<p>After executing these steps, it\u2019s imperative to <strong>exit<\/strong> the terminal session promptly to avoid automatic flushing of in-memory history back to <code>.bash_history<\/code>.<\/p>\n<h2>Advanced Techniques<\/h2>\n<h3>Overwrite the History File<\/h3>\n<p>Simply deleting or emptying the <code>~\/.bash_history<\/code> file doesn&#8217;t safely remove the content if you wish to overwrite the data permanently for security purposes. You can use:<\/p>\n<pre><code>shred -u ~\/.bash_history<\/code><\/pre>\n<p>This will shred and delete the file in a way that makes it more difficult for forensic recovery.<\/p>\n<h3>Disable History for a Session<\/h3>\n<p>If you want to temporarily disable command history tracking in an active shell session, use:<\/p>\n<pre><code>set +o history<\/code><\/pre>\n<p>Your subsequent commands in that session won\u2019t be recorded. To resume logging history:<\/p>\n<pre><code>set -o history<\/code><\/pre>\n<h3>Disabling Command History Permanently<\/h3>\n<p>For users who want to disable history altogether (although not generally recommended), you can add the following to your <code>~\/.bashrc<\/code> file:<\/p>\n<pre><code>unset HISTFILE\nexport HISTSIZE=0\nexport HISTFILESIZE=0<\/code><\/pre>\n<p>This effectively disables history saving permanently. Note that this will impact your productivity since you will no longer be able to navigate previous commands.<\/p>\n<h2>Environment Variables That Control Bash History<\/h2>\n<p>Several environment variables control how Bash behaves with history. Understanding and configuring these can help enforce better control over your command logging.<\/p>\n<ul>\n<li><strong>HISTFILE:<\/strong> The name of the file in which command history is saved (default is <code>~\/.bash_history<\/code>).<\/li>\n<li><strong>HISTFILESIZE:<\/strong> The maximum number of lines contained in the history file.<\/li>\n<li><strong>HISTSIZE:<\/strong> The number of commands to remember in the current session.<\/li>\n<li><strong>HISTCONTROL:<\/strong> Can be set to ignore duplicates or commands starting with a space.<\/li>\n<li><strong>HISTIGNORE:<\/strong> A colon-separated list of patterns to exclude from history.<\/li>\n<\/ul>\n<p>Example to ignore common commands:<\/p>\n<pre><code>export HISTIGNORE=\"ls:cd:pwd:exit\"<\/code><\/pre>\n<h2>Considerations on Multi-User Systems<\/h2>\n<p>If you\u2019re on a shared server or computer, be aware that user switching (e.g., using <code>sudo<\/code> or <code>su<\/code>) may preserve command histories across users unless explicitly cleared at each user level. Also, remember that root users can often retrieve deleted files or access user history files if sufficient precautions are not taken.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace.jpg 1080w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace-300x200.jpg 300w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace-1024x683.jpg 1024w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace-575x383.jpg 575w, https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2026\/03\/a-laptop-computer-sitting-on-top-of-a-wooden-desk-ubuntu-desktop-interface-linux-gnome-desktop-modern-linux-workspace-768x512.jpg 768w\" sizes=\"(max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Automating Bash History Clearing<\/h2>\n<p>If you frequently work with sensitive information and want regular purging of history, consider automating it:<\/p>\n<h3>Set up a cron job<\/h3>\n<p>Create a cron job that shreds your <code>~\/.bash_history<\/code> at regular intervals:<\/p>\n<pre><code>crontab -e<\/code><\/pre>\n<p>And add:<\/p>\n<pre><code>@daily shred -u ~\/.bash_history<\/code><\/pre>\n<h3>Add to Your Shell Logout Script<\/h3>\n<p>Append history clearing logic to <code>~\/.bash_logout<\/code>:<\/p>\n<pre><code>history -c\ncat \/dev\/null &gt; ~\/.bash_history<\/code><\/pre>\n<h2>Aftermath: Implications of Erased Histories<\/h2>\n<p>While clearing your history improves security, it has downsides. Removing logs hinders auditing, accountability, and understanding of past issues. Be careful in production or enterprise environments\u2014auditors often require logs as part of compliance. Some organizations mandate preserving histories under strict data handling policies.<\/p>\n<h2>Conclusion<\/h2>\n<p>Clearing your Bash history is a responsible and sometimes necessary act, particularly when working with sensitive data or in shared computing environments. However, it isn\u2019t a one-step process\u2014it involves careful handling of both in-memory and persistently stored data. By understanding how Bash logs work and taking steps to configure or clear them appropriately, you maintain control over your shell activity.<\/p>\n<p>Always make sure you&#8217;re not violating organizational policies when clearing history. When done thoughtfully, these practices offer a more secure and private computing experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our increasingly digital world, privacy and data protection have taken on heightened importance. Whether you&#8217;re a system administrator, a developer, or a casual user, there are moments when you might need to remove your command history from your terminal. This is especially critical when you&#8217;re working on sensitive tasks, using production credentials, or sharing your machine with others. In Unix-like systems like Linux and macOS, the Bash shell conveniently stores your command history \u2013 but sometimes that convenience could also become a vulnerability. <\/p>\n<p class=\"read-more-container\"><a href=\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\" class=\"read-more button\">Read more<\/a><\/p>\n","protected":false},"author":91,"featured_media":8465,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8677","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Clear Bash History (Linux\/Mac)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Clear Bash History (Linux\/Mac)\" \/>\n<meta property=\"og:description\" content=\"In our increasingly digital world, privacy and data protection have taken on heightened importance. Whether you&#8217;re a system administrator, a developer, or a casual user, there are moments when you might need to remove your command history from your terminal. This is especially critical when you&#8217;re working on sensitive tasks, using production credentials, or sharing your machine with others. In Unix-like systems like Linux and macOS, the Bash shell conveniently stores your command history \u2013 but sometimes that convenience could also become a vulnerability. Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\" \/>\n<meta property=\"og:site_name\" content=\"Resize my Image Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webfactoryltd\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-20T16:31:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-20T16:39:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jame Miller\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webfactoryltd\" \/>\n<meta name=\"twitter:site\" content=\"@webfactoryltd\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jame Miller\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\"},\"author\":{\"name\":\"Jame Miller\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/4bece8cd1b5bcd61a4e5dab002eb7dca\"},\"headline\":\"How to Clear Bash History (Linux\/Mac)\",\"datePublished\":\"2025-11-20T16:31:22+00:00\",\"dateModified\":\"2025-11-20T16:39:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\"},\"wordCount\":943,\"publisher\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\",\"url\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\",\"name\":\"How to Clear Bash History (Linux\/Mac)\",\"isPartOf\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg\",\"datePublished\":\"2025-11-20T16:31:22+00:00\",\"dateModified\":\"2025-11-20T16:39:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage\",\"url\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg\",\"contentUrl\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg\",\"width\":1080,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/resizemyimg.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Clear Bash History (Linux\/Mac)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#website\",\"url\":\"https:\/\/resizemyimg.com\/blog\/\",\"name\":\"Resize my Image Blog\",\"description\":\"News, insights, tips&amp;tricks on image related business &amp; SaaS\",\"publisher\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/resizemyimg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#organization\",\"name\":\"WebFactory Ltd\",\"url\":\"https:\/\/resizemyimg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2019\/12\/webfactory_icon.png\",\"contentUrl\":\"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2019\/12\/webfactory_icon.png\",\"width\":300,\"height\":300,\"caption\":\"WebFactory Ltd\"},\"image\":{\"@id\":\"https:\/\/resizemyimg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webfactoryltd\/\",\"https:\/\/x.com\/webfactoryltd\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/4bece8cd1b5bcd61a4e5dab002eb7dca\",\"name\":\"Jame Miller\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f60a3114f608fcfdd6b15a13f37f24b2?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f60a3114f608fcfdd6b15a13f37f24b2?s=96&d=monsterid&r=g\",\"caption\":\"Jame Miller\"},\"description\":\"I'm Jame Miller, a cybersecurity analyst and blogger. Sharing knowledge on online security, data protection, and privacy issues is what I do best.\",\"url\":\"https:\/\/resizemyimg.com\/blog\/author\/jamesm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Clear Bash History (Linux\/Mac)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/","og_locale":"en_US","og_type":"article","og_title":"How to Clear Bash History (Linux\/Mac)","og_description":"In our increasingly digital world, privacy and data protection have taken on heightened importance. Whether you&#8217;re a system administrator, a developer, or a casual user, there are moments when you might need to remove your command history from your terminal. This is especially critical when you&#8217;re working on sensitive tasks, using production credentials, or sharing your machine with others. In Unix-like systems like Linux and macOS, the Bash shell conveniently stores your command history \u2013 but sometimes that convenience could also become a vulnerability. Read more","og_url":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/","og_site_name":"Resize my Image Blog","article_publisher":"https:\/\/www.facebook.com\/webfactoryltd\/","article_published_time":"2025-11-20T16:31:22+00:00","article_modified_time":"2025-11-20T16:39:10+00:00","og_image":[{"width":1080,"height":720,"url":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg","type":"image\/jpeg"}],"author":"Jame Miller","twitter_card":"summary_large_image","twitter_creator":"@webfactoryltd","twitter_site":"@webfactoryltd","twitter_misc":{"Written by":"Jame Miller","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#article","isPartOf":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/"},"author":{"name":"Jame Miller","@id":"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/4bece8cd1b5bcd61a4e5dab002eb7dca"},"headline":"How to Clear Bash History (Linux\/Mac)","datePublished":"2025-11-20T16:31:22+00:00","dateModified":"2025-11-20T16:39:10+00:00","mainEntityOfPage":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/"},"wordCount":943,"publisher":{"@id":"https:\/\/resizemyimg.com\/blog\/#organization"},"image":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/","url":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/","name":"How to Clear Bash History (Linux\/Mac)","isPartOf":{"@id":"https:\/\/resizemyimg.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage"},"image":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage"},"thumbnailUrl":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg","datePublished":"2025-11-20T16:31:22+00:00","dateModified":"2025-11-20T16:39:10+00:00","breadcrumb":{"@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#primaryimage","url":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg","contentUrl":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2025\/11\/a-laptop-computer-sitting-on-top-of-a-desk-vim-screen-terminal-split-fullscreen-navigation.jpg","width":1080,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/resizemyimg.com\/blog\/how-to-clear-bash-history-linux-mac\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/resizemyimg.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Clear Bash History (Linux\/Mac)"}]},{"@type":"WebSite","@id":"https:\/\/resizemyimg.com\/blog\/#website","url":"https:\/\/resizemyimg.com\/blog\/","name":"Resize my Image Blog","description":"News, insights, tips&amp;tricks on image related business &amp; SaaS","publisher":{"@id":"https:\/\/resizemyimg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/resizemyimg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/resizemyimg.com\/blog\/#organization","name":"WebFactory Ltd","url":"https:\/\/resizemyimg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/resizemyimg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2019\/12\/webfactory_icon.png","contentUrl":"https:\/\/resizemyimg.com\/blog\/wp-content\/uploads\/2019\/12\/webfactory_icon.png","width":300,"height":300,"caption":"WebFactory Ltd"},"image":{"@id":"https:\/\/resizemyimg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webfactoryltd\/","https:\/\/x.com\/webfactoryltd"]},{"@type":"Person","@id":"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/4bece8cd1b5bcd61a4e5dab002eb7dca","name":"Jame Miller","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/resizemyimg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f60a3114f608fcfdd6b15a13f37f24b2?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f60a3114f608fcfdd6b15a13f37f24b2?s=96&d=monsterid&r=g","caption":"Jame Miller"},"description":"I'm Jame Miller, a cybersecurity analyst and blogger. Sharing knowledge on online security, data protection, and privacy issues is what I do best.","url":"https:\/\/resizemyimg.com\/blog\/author\/jamesm\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/posts\/8677"}],"collection":[{"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/users\/91"}],"replies":[{"embeddable":true,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/comments?post=8677"}],"version-history":[{"count":1,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/posts\/8677\/revisions"}],"predecessor-version":[{"id":8683,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/posts\/8677\/revisions\/8683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/media\/8465"}],"wp:attachment":[{"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/media?parent=8677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/categories?post=8677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resizemyimg.com\/blog\/wp-json\/wp\/v2\/tags?post=8677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}