Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-09-2015, 10:44 AM   #1
Registered: Jan 2012
Posts: 56

Rep: Reputation: Disabled
Clear buffer and cache.

How to clear buffer and cache memory.

Mem: 8027952 4377300 3650652 0 103648 1630364
-/+ buffers/cache: 2643288 5384664
Swap: 15624188 608948 15015240
Old 07-09-2015, 12:41 PM   #2
Weapon S
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 260
Blog Entries: 2

Rep: Reputation: 49
When you issue "sync" (leave the quotes out of your terminal) Linux should write out buffers to disk.
Old 07-09-2015, 12:53 PM   #3
LQ Newbie
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
You generally *don't* want to clear buffer and cache memory. Cache will keep commonly-used disk items in memory for reuse later, with the idea that you want as close to 100 of memory utilized as often as possible, as unused memory is useless. Should the memory be needed for programs later the kernel will reallocate cache memory as needed to programs.
Old 07-10-2015, 05:40 AM   #4
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 47

Rep: Reputation: 7
As said above, it might not be a very good idea, but to do it i would suggest something like:

sync && echo 3 > /proc/sys/vm/drop_caches
Have a look here or there.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Clear Keyboard Buffer Ace Blackwell Programming 9 02-28-2015 01:52 PM
How to Clear buffer/cache memory deepak_message Linux - Server 5 01-29-2013 08:56 AM
Difference between page cache and buffer cache Nayaka Linux - Kernel 5 09-28-2011 09:23 AM
Clear Print Buffer? FlameKhan General 2 03-15-2005 03:29 AM
How do I clear less' buffer? hussar Slackware 7 12-24-2004 05:44 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration