Release memory used by the Linux kernel on caches

free && sync && echo 3 > /proc/sys/vm/drop_caches && free
The Linux kernel uses unused memory in caches. When you execute "free" you never get the "real" available memory.
Sample Output
             total       used       free     shared    buffers     cached
Mem:       1018916     980832      38084          0      46924     355764
-/+ buffers/cache:     578144     440772
Swap:      2064376        128    2064248
             total       used       free     shared    buffers     cached
Mem:       1018916     685008     333908          0        224     108252
-/+ buffers/cache:     576532     442384
Swap:      2064376        128    2064248

38
2009-08-05 23:44:34

6 Alternatives + Submit Alt

What Others Think

Another way: add up the "MemFree", "Buffers", and "Cached" amounts in /proc/meminfo.
bwoodacre · 619 weeks and 6 days ago
really saved my bacon today!
linuxrawkstar · 555 weeks and 4 days ago
DON'T DO THIS! This command shows a serious lack of understanding by the author and those who voted it up. You don't want to clear your disk cache because its a helpful thing. If you want to know how much memory you have available for applications, look at the number in the free column on the -/+ buffers/cache line. For more information, see http://www.linuxatemyram.com/
deltaray · 456 weeks and 6 days ago
DON'T DO THIS! This command shows a serious lack of understanding by the author and those who voted it up. You don't want to clear your disk cache because its a helpful thing. If you want to know how much memory you have available for applications, look at the number in the free column on the -/+ buffers/cache line. For more information, see http://www.linuxatemyram.com/
deltaray · 456 weeks and 6 days ago
This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog.. Click here
bojokey283 · 25 weeks and 3 days ago
Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work. read more
xoheko1229 · 25 weeks ago
Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. instagram Abonnenten kaufen bei abonnenten24.de
bojokey283 · 24 weeks and 3 days ago
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. Domótica
bojokey283 · 24 weeks and 2 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. digital marketing
bojokey283 · 24 weeks and 1 day ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. alquiler de carros en cartagena
bojokey283 · 22 weeks and 3 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. bridgend house clearance
bojokey283 · 22 weeks and 2 days ago
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. hartlepool removals
bojokey283 · 22 weeks and 2 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. Heimautomation
bojokey283 · 22 weeks ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. tree surgeon in colchester
bojokey283 · 21 weeks and 6 days ago
I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. covid isla mujeres
bojokey283 · 21 weeks and 3 days ago
Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. best places to snorkel in cozumel
bojokey283 · 20 weeks and 2 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. pályázatírás" rel="nofollow">http://www.fokuszpalyazat.hu/'>pályázatírás Debrecen referenciákkal
bojokey283 · 17 weeks and 6 days ago
this is really nice to read..informative post is very good to read..thanks a lot! best smm panel
xoheko1229 · 17 weeks and 2 days ago
This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here! best cenotes yucatan
xoheko1229 · 17 weeks and 2 days ago
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. rumah pintar
bojokey283 · 17 weeks ago
I’ve been searching for some decent stuff on the subject and haven't had any luck up until this point, You just got a new biggest fan!.. kombájn szállítás olcsón
bojokey283 · 16 weeks ago
Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject. best place to eat in cozumel
xoheko1229 · 16 weeks ago
I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts. nightlife in Cozumel
xoheko1229 · 15 weeks and 6 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. yuctana food
xoheko1229 · 15 weeks and 3 days ago
hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. tulum resorts 5 star
xoheko1229 · 15 weeks and 2 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. tulum top restaurants
xoheko1229 · 15 weeks and 1 day ago
Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. top hotels in playa del carmen
xoheko1229 · 14 weeks and 6 days ago
Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you!top restaurants holbox
xoheko1229 · 14 weeks and 3 days ago
Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks. treatnheal
xoheko1229 · 13 weeks and 1 day ago
Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks. treatnheal
xoheko1229 · 13 weeks and 1 day ago
I was looking at some of your posts on this website and I conceive this web site is really instructive! Keep putting up.. Automatyka domowa
xoheko1229 · 12 weeks and 3 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. luxury bathroom vanity
bojokey283 · 11 weeks and 2 days ago
Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback. best area to stay in tulum
xoheko1229 · 10 weeks and 3 days ago
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. coronavirus mexico https://www.islandlifemexico.com/coronavirus-in-mexico/
bojokey283 · 10 weeks and 1 day ago
I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! taroko gorge trails
xoheko1229 · 9 weeks and 6 days ago
I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit. What to do in Hualien
bojokey283 · 9 weeks and 5 days ago
I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. Area Rug Cleaning
bojokey283 · 4 weeks and 3 days ago
Hi! Thanks for the great information you have provided! You have touched on crucuial points! things to do in cozumel
xoheko1229 · 1 week and 6 days ago
Nice to be visiting your blog once more, it has been months for me. Well this article that ive been waited for therefore long. i want this article to finish my assignment within the faculty, and it has same topic together with your article. Thanks, nice share. St Thomas charter boats
xoheko1229 · 1 week and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: