{"id":21349,"date":"2025-11-22T08:35:04","date_gmt":"2025-11-22T08:35:04","guid":{"rendered":"https:\/\/www.webhosting.uk.com\/kb\/?p=21349"},"modified":"2026-06-03T09:15:16","modified_gmt":"2026-06-03T09:15:16","slug":"how-to-clear-system-cache-and-free-memory-in-linux","status":"publish","type":"post","link":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/","title":{"rendered":"How to Clear System Cache and Free Memory in Linux"},"content":{"rendered":"<p>Linux automatically uses available memory to cache files and speed up system performance. This behaviour is both normal and efficient. However, during heavy workloads, performance testing, or troubleshooting, you may need to manually clear cached memory to free resources or reset memory usage.<\/p>\n<p>This guide provides clear, reliable instructions to safely clear the cache on Linux systems.<\/p>\n<div class=\"more-tab-content\">\n<h2><strong>Table of Contents<\/strong><\/h2>\n<ol>\n<li><a href=\"#matters\">Why Clearing Cache Matters?<\/a><\/li>\n<li><a href=\"#works\">How Linux Caching Works?<\/a><\/li>\n<li><a href=\"#usage\">Check Current Memory Usage<\/a><\/li>\n<li><a href=\"#cache\">Safely Clear Cache (Step-by-Step)<\/a><\/li>\n<li><a href=\"#clearing\">Optional: Automate Cache Clearing via Cron<\/a><\/li>\n<li><a href=\"#memory\">Verify Memory After Clearing Cache<\/a><a name=\"matters\"><\/a><\/li>\n<li><a href=\"#practices\">Best Practices<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ol>\n<\/div>\n<h3><strong>Why Clearing Cache Matters?<\/strong><\/h3>\n<p>Clearing the cache is helpful when:<\/p>\n<ul>\n<li>Your server is running low on free memory<\/li>\n<li>Applications are not releasing memory properly<\/li>\n<li>You need accurate<a name=\"works\"><\/a> RAM usage for testing<\/li>\n<li>You want to benchmark or troubleshoot performance<\/li>\n<\/ul>\n<h3><strong>How Linux Caching Works?<\/strong><\/h3>\n<p>Linux is intended to make your system faster by using unused RAM to store recently accessed data. Instead of letting memory sit idle, Linux turns it into a high-speed cache that helps applications load files more quickly.<\/p>\n<p>Linux mainly uses three types of cache:<\/p>\n<ul>\n<li>Page Cache<br \/>\nStores actual file contents in memory. When a file is opened again, Linux can load it directly from RAM instead of reading it from the slower disk.<\/li>\n<li>Dentries and Inodes<br \/>\nThese store directory paths, file names, and information about files (such as permissions and owners). This speeds up operations like navigating folders or checking file details.<\/li>\n<\/ul>\n<p>In normal operation, <a name=\"usage\"><\/a>Linux automatically manages this cached memory and frees it when applications need more space. However, administrators may clear the cache manually during troubleshooting, testing, or memory debugging.<\/p>\n<p>Clearing the cache is safe, but after clearing, the system may run slightly slower until it rebuilds the cache naturally. Root or sudo access is required to perform these actions.<\/p>\n<h3><strong>Check Current<a name=\"cache\"><\/a> Memory Usage<\/strong><\/h3>\n<p>Run:<\/p>\n<pre>free -h<\/pre>\n<p>This helps you compare memory usage before and after clearing the cache.<\/p>\n<h3><strong>Safely Clear Cache (Step-by-Step)<\/strong><\/h3>\n<ol>\n<li>Sync Disk Data<br \/>\nBefore clearing the cache, it is important to ensure that all pending data is written to the disk. This prevents accidental data loss.<br \/>\nRun:<\/p>\n<pre>sync<\/pre>\n<p>This command doesn\u2019t clear anything; it simply saves all buffered data.<\/li>\n<li>Clear the Cache<br \/>\nLinux provides three safe options to clear the memory cache. Use the one that fits your needs.<\/p>\n<ol>\n<li>Clear Only Page Cache\n<pre>echo 1 &gt; \/proc\/sys\/vm\/drop_caches<\/pre>\n<p>Use this if you only want to remove cached file data.<\/li>\n<li>Clear Only Dentries and Inodes\n<pre>echo 2 &gt; \/proc\/sys\/vm\/drop_caches<\/pre>\n<p>This removes cached directory and file metadata.<\/li>\n<li>Clear Page Cache, Dentries &amp; Inodes (Most Common)\n<pre>echo 3 &gt; \/proc\/sys\/vm\/drop_caches<\/pre>\n<p>This clears everything: file data + directory &amp; file metadata.<br \/>\nIt is the most commonly used option for troubleshooting.<\/li>\n<\/ol>\n<\/li>\n<li>Recommended One-Line Command<br \/>\nMost system admins use this:<\/p>\n<pre>sync &amp;&amp; echo 3 &gt; \/proc\/sys\/vm\/drop_caches<\/pre>\n<p>It ensures <a name=\"clearing\"><\/a>data safety (sync) and clears all cache types in one go.<\/li>\n<\/ol>\n<h3><strong>Optional: Automate Cache Clearing via Cron<\/strong><\/h3>\n<p>If you want the system to clear the cache automatically at a fixed time, create a cron job.<\/p>\n<p>Example: Clear the cache every night at midnight<\/p>\n<pre>0 0 * * * root sync &amp;&amp; echo 3 &gt; \/proc\/sys\/vm\/drop_caches<\/pre>\n<p>How to <a name=\"memory\"><\/a>add the cron job?<\/p>\n<p>Run the following command:<\/p>\n<pre>crontab -e<\/pre>\n<p>Then paste the cron entry into the file and save.<\/p>\n<h3><strong>Verify Memory After Clearing Cache<\/strong><\/h3>\n<p>Using the <a name=\"practices\"><\/a>following command:<\/p>\n<pre>free -h<\/pre>\n<p>You should notice a reduction in cached memory.<\/p>\n<h3><strong>Best Practices<\/strong><\/h3>\n<ul>\n<li>Only clear the cache when needed.<\/li>\n<li>Linux manages memory efficiently; avoid frequent cache clearing.<\/li>\n<li>Monitor system <a name=\"conclusion\"><\/a>performance before and after clearing.<\/li>\n<li>Avoid scheduling cache clearing on production systems unless required.<\/li>\n<\/ul>\n<div style=\"background: #E6F0FF; padding: 15px; border-left: 4px solid #0047BA; margin: 20px 0;\"><strong>Need more resources for growing applications?<\/strong><br \/>\nOur <a href=\"https:\/\/www.webhosting.uk.com\/linux-vps\">Linux VPS Hosting plans<\/a> offer dedicated memory, root access and the flexibility to scale as your requirements grow.<\/div>\n<h3><strong>Conclusion <\/strong><\/h3>\n<p>This way, clearing the cache in Linux can be extremely helpful for diagnosing performance issues, optimising memory usage, and testing how applications behave under fresh system conditions. The methods shared in this guide follow safe, reliable, and widely accepted system administration practices.<\/p>\n<p>If you need any assistance, our support team is always available to help with performance tuning, memory-related concerns, or overall system optimisation.<\/p>\n<p style=\"text-align: center;\"><em><strong>Looking to clear cache at the server level? Check out our guide on <a href=\"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-the-nginx-cache-from-whm\/\"> How to clear the Nginx cache from WHM<\/a><\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux automatically uses available memory to cache files and speed up system performance. This behaviour is both normal and efficient. However, during heavy workloads, performance testing, or troubleshooting, you may&hellip;<\/p>\n<p><a href=\"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/\" class=\"more-link\">Read More<\/a><\/p>\n<div class='heateorSssClear'><\/div><div  class='heateor_sss_sharing_container heateor_sss_horizontal_sharing' data-heateor-sss-href='https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/'><div class='heateor_sss_sharing_title' style=\"font-weight:bold\" >Spread the love<\/div><div class=\"heateor_sss_sharing_ul\"><a aria-label=\"Facebook\" class=\"heateor_sss_facebook\" href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwww.webhosting.uk.com%2Fkb%2Fhow-to-clear-system-cache-and-free-memory-in-linux%2F\" title=\"Facebook\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#0765FE;width:40px;height:40px;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path fill=\"#fff\" d=\"M28 16c0-6.627-5.373-12-12-12S4 9.373 4 16c0 5.628 3.875 10.35 9.101 11.647v-7.98h-2.474V16H13.1v-1.58c0-4.085 1.849-5.978 5.859-5.978.76 0 2.072.15 2.608.298v3.325c-.283-.03-.775-.045-1.386-.045-1.967 0-2.728.745-2.728 2.683V16h3.92l-.673 3.667h-3.247v8.245C23.395 27.195 28 22.135 28 16Z\"><\/path><\/svg><\/span><\/a><a aria-label=\"X\" class=\"heateor_sss_button_x\" href=\"https:\/\/twitter.com\/intent\/tweet?text=How%20to%20Clear%20System%20Cache%20and%20Free%20Memory%20in%20Linux&url=https%3A%2F%2Fwww.webhosting.uk.com%2Fkb%2Fhow-to-clear-system-cache-and-free-memory-in-linux%2F\" title=\"X\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_x\" style=\"background-color:#2a2a2a;width:40px;height:40px;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg width=\"100%\" height=\"100%\" style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#fff\" d=\"M21.751 7h3.067l-6.7 7.658L26 25.078h-6.172l-4.833-6.32-5.531 6.32h-3.07l7.167-8.19L6 7h6.328l4.37 5.777L21.75 7Zm-1.076 16.242h1.7L11.404 8.74H9.58l11.094 14.503Z\"><\/path><\/svg><\/span><\/a><a aria-label=\"Linkedin\" class=\"heateor_sss_button_linkedin\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fwww.webhosting.uk.com%2Fkb%2Fhow-to-clear-system-cache-and-free-memory-in-linux%2F\" title=\"Linkedin\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_linkedin\" style=\"background-color:#0077b5;width:40px;height:40px;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path d=\"M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><\/div><div class=\"heateorSssClear\"><\/div><\/div><div class='heateorSssClear'><\/div>","protected":false},"author":28,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1409],"tags":[204],"class_list":["post-21349","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.9 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Clear System Cache and Free Memory in Linux<\/title>\n<meta name=\"description\" content=\"Discover safe methods to clear cache in Linux, free up RAM, &amp; optimise performance. Includes commands, steps, cron automation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Clear System Cache and Free Memory in Linux\" \/>\n<meta property=\"og:description\" content=\"Discover safe methods to clear cache in Linux, free up RAM, &amp; optimise performance. Includes commands, steps, cron automation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Webhosting UK Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhostingukcom\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-22T08:35:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T09:15:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhosting.uk.com\/kb\/wp-content\/uploads\/2023\/08\/WHUK-logo-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Victor G\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Clear System Cache and Free Memory in Linux\" \/>\n<meta name=\"twitter:description\" content=\"Discover safe methods to clear cache in Linux, free up RAM, &amp; optimise performance. Includes commands, steps, cron automation.\" \/>\n<meta name=\"twitter:creator\" content=\"@WebhostingUKcom\" \/>\n<meta name=\"twitter:site\" content=\"@WebhostingUKcom\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/\"},\"author\":{\"name\":\"Victor G\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#\\\/schema\\\/person\\\/ea067684eae84c2b8b49a81c69407297\"},\"headline\":\"How to Clear System Cache and Free Memory in Linux\",\"datePublished\":\"2025-11-22T08:35:04+00:00\",\"dateModified\":\"2026-06-03T09:15:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/\"},\"wordCount\":670,\"publisher\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#organization\"},\"keywords\":[\"Linux\"],\"articleSection\":[\"Servers, Hosting &amp; Email\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/\",\"url\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/\",\"name\":\"How to Clear System Cache and Free Memory in Linux\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#website\"},\"datePublished\":\"2025-11-22T08:35:04+00:00\",\"dateModified\":\"2026-06-03T09:15:16+00:00\",\"description\":\"Discover safe methods to clear cache in Linux, free up RAM, & optimise performance. Includes commands, steps, cron automation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/how-to-clear-system-cache-and-free-memory-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Clear System Cache and Free Memory in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/\",\"name\":\"Webhosting UK Knowledge Base\",\"description\":\"Expert Insights on Hosting, Development, Security, Marketing, and SEO\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#organization\"},\"alternateName\":\"WHUK\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#organization\",\"name\":\"Webhosting UK\",\"alternateName\":\"WHUK\",\"url\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/WHUK-logo-1.png\",\"contentUrl\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/WHUK-logo-1.png\",\"width\":1200,\"height\":628,\"caption\":\"Webhosting UK\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/webhostingukcom\",\"https:\\\/\\\/x.com\\\/WebhostingUKcom\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/webhostinguk\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/webhosting-uk-com-ltd\\\/\",\"https:\\\/\\\/www.instagram.com\\\/webhosting_uk\\\/\",\"https:\\\/\\\/www.tiktok.com\\\/@webhostinguk\"],\"description\":\"Fast, reliable, and cost-effective website hosting services with Webhosting UK. Committed to providing you secure support around the clock.\",\"email\":\"sales@webhosting.uk.com\",\"telephone\":\"0800 862 0890\",\"legalName\":\"Webhosting UK\",\"foundingDate\":\"2001-02-07\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"51\",\"maxValue\":\"200\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webhosting.uk.com\\\/kb\\\/#\\\/schema\\\/person\\\/ea067684eae84c2b8b49a81c69407297\",\"name\":\"Victor G\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g\",\"caption\":\"Victor G\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Clear System Cache and Free Memory in Linux","description":"Discover safe methods to clear cache in Linux, free up RAM, & optimise performance. Includes commands, steps, cron automation.","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:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/","og_locale":"en_GB","og_type":"article","og_title":"How to Clear System Cache and Free Memory in Linux","og_description":"Discover safe methods to clear cache in Linux, free up RAM, & optimise performance. Includes commands, steps, cron automation.","og_url":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/","og_site_name":"Webhosting UK Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/webhostingukcom","article_published_time":"2025-11-22T08:35:04+00:00","article_modified_time":"2026-06-03T09:15:16+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.webhosting.uk.com\/kb\/wp-content\/uploads\/2023\/08\/WHUK-logo-1.png","type":"image\/png"}],"author":"Victor G","twitter_card":"summary_large_image","twitter_title":"How to Clear System Cache and Free Memory in Linux","twitter_description":"Discover safe methods to clear cache in Linux, free up RAM, & optimise performance. Includes commands, steps, cron automation.","twitter_creator":"@WebhostingUKcom","twitter_site":"@WebhostingUKcom","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/"},"author":{"name":"Victor G","@id":"https:\/\/www.webhosting.uk.com\/kb\/#\/schema\/person\/ea067684eae84c2b8b49a81c69407297"},"headline":"How to Clear System Cache and Free Memory in Linux","datePublished":"2025-11-22T08:35:04+00:00","dateModified":"2026-06-03T09:15:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/"},"wordCount":670,"publisher":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/#organization"},"keywords":["Linux"],"articleSection":["Servers, Hosting &amp; Email"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/","url":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/","name":"How to Clear System Cache and Free Memory in Linux","isPartOf":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/#website"},"datePublished":"2025-11-22T08:35:04+00:00","dateModified":"2026-06-03T09:15:16+00:00","description":"Discover safe methods to clear cache in Linux, free up RAM, & optimise performance. Includes commands, steps, cron automation.","breadcrumb":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhosting.uk.com\/kb\/how-to-clear-system-cache-and-free-memory-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhosting.uk.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to Clear System Cache and Free Memory in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.webhosting.uk.com\/kb\/#website","url":"https:\/\/www.webhosting.uk.com\/kb\/","name":"Webhosting UK Knowledge Base","description":"Expert Insights on Hosting, Development, Security, Marketing, and SEO","publisher":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/#organization"},"alternateName":"WHUK","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhosting.uk.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.webhosting.uk.com\/kb\/#organization","name":"Webhosting UK","alternateName":"WHUK","url":"https:\/\/www.webhosting.uk.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.webhosting.uk.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhosting.uk.com\/kb\/wp-content\/uploads\/2023\/08\/WHUK-logo-1.png","contentUrl":"https:\/\/www.webhosting.uk.com\/kb\/wp-content\/uploads\/2023\/08\/WHUK-logo-1.png","width":1200,"height":628,"caption":"Webhosting UK"},"image":{"@id":"https:\/\/www.webhosting.uk.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhostingukcom","https:\/\/x.com\/WebhostingUKcom","https:\/\/www.youtube.com\/c\/webhostinguk","https:\/\/www.linkedin.com\/company\/webhosting-uk-com-ltd\/","https:\/\/www.instagram.com\/webhosting_uk\/","https:\/\/www.tiktok.com\/@webhostinguk"],"description":"Fast, reliable, and cost-effective website hosting services with Webhosting UK. Committed to providing you secure support around the clock.","email":"sales@webhosting.uk.com","telephone":"0800 862 0890","legalName":"Webhosting UK","foundingDate":"2001-02-07","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"51","maxValue":"200"}},{"@type":"Person","@id":"https:\/\/www.webhosting.uk.com\/kb\/#\/schema\/person\/ea067684eae84c2b8b49a81c69407297","name":"Victor G","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9bf0713adcbaded4878508c93d93927ecbfa4f74548fd9bcee41478d8768bd66?s=96&d=mm&r=g","caption":"Victor G"}}]}},"_links":{"self":[{"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/posts\/21349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/comments?post=21349"}],"version-history":[{"count":11,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/posts\/21349\/revisions"}],"predecessor-version":[{"id":22718,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/posts\/21349\/revisions\/22718"}],"wp:attachment":[{"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/media?parent=21349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/categories?post=21349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhosting.uk.com\/kb\/wp-json\/wp\/v2\/tags?post=21349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}