<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>trick Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/trick/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 14 Oct 2020 16:16:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to clear cache on any distribution Linux?</title>
		<link>https://www.osradar.com/clear-cache-any-linux/</link>
					<comments>https://www.osradar.com/clear-cache-any-linux/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 15 Oct 2020 02:15:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=24529</guid>

					<description><![CDATA[<p>Hello, friends. In this very short post, we will show you how to clear the cache in Linux. This tutorial, although it will be done in Ubuntu, will work in any distribution that has systemd. Linux is an operating system that manages memory very well and that&#8217;s why the cache exists. Every time we open [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/clear-cache-any-linux/">How to clear cache on any distribution Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, friends. In this very short post,<strong> we will show you how to clear the cache in Linux</strong>. This tutorial, although it will be done in <a href="https://www.osradar.com/tag/ubuntu" target="_blank" rel="noreferrer noopener">Ubuntu</a>, will work in any distribution that has systemd.</p>



<p>Linux is an operating system that manages memory very well and that&#8217;s why the cache exists. Every time we open a file or directory they are temporarily stored in the main memory to make them accessible and speed up the system. However, there are situations in which it is required to clean the cache to free more space in it.</p>



<p>So it can be done from the terminal without any problem. Let&#8217;s see.</p>



<h2>Clear cache on any Linux distribution</h2>



<p>The first thing to know is that in Linux there are several types of cache.</p>



<p>On the one hand, there is the <strong>PageCache</strong> that refers to files and programs that are stored in RAM and do not need to be reloaded from the hard disk.</p>



<p>On the other hand, there is <strong>Dentry and inode</strong> cache which are the attributes of these files.</p>



<p>So let&#8217;s get to the point.</p>



<p>First, execute the <code>free</code> command with the <code>-h</code> argument so that you notice how the RAM is being used.</p>



<pre class="wp-block-preformatted">free -h</pre>



<p>In my case the screen output gives the following data:</p>



<pre class="wp-block-preformatted">total used free shared buff/cache available
Mem: 3,7G 2,2G 145M 242M 1,3G 934M
Swap: 964M 11M 953M</pre>



<p>As you can see my computer has little RAM and the cache takes a good part.</p>



<p>If you want to clean it up, just execute the following command:</p>



<pre class="wp-block-preformatted">sudo sysctl vm.drop_caches=3</pre>



<p>This command will remove all the cache, but you can also just remove the PageCache, by running</p>



<pre class="wp-block-preformatted">sudo sysctl vm.drop_caches=1</pre>



<p>Or just the inodes:</p>



<pre class="wp-block-preformatted">sudo sysctl vm.drop_caches=2</pre>



<p>In any case, if you execute the free command again you will be able to notice the results.</p>



<pre class="wp-block-preformatted">free -h</pre>



<p>So, congratulations, you completed the tutorial and you know how to clear cache on Linux.</p>



<h2>Conclusion</h2>



<p>Generally, you will probably never feel the need to go through this process, but it is good to know so that you can use it when necessary.</p>



<p>Finally, remember that cleaning the cache can slow down the system at first, but it can be used in specific cases.</p>



<p>So, share this post and join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener">our Telegram channel</a> and our <a href="https://www.facebook.com/osradar" target="_blank" rel="noreferrer noopener">Facebook page</a>. Also, buy us a coffee 😉</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/clear-cache-any-linux/">How to clear cache on any distribution Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/clear-cache-any-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
