Facebook Twitter Instagram
    WiredRevolution.com
    • Home
    • About
    • Contact Us
    • Essential Linux Commands
    • Sitemap
    Facebook Twitter Instagram
    WiredRevolution.com
    system administration

    How to release the Linux disk cache

    RyanBy RyanNovember 19, 2010Updated:November 19, 20101 Min Read
    Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email

    For whatever reason you may need to free the disk cache at some point. Since Linux 2.6.16 the interface /proc/sys/vm/drop_caches has been available to simplify this process.

    First we run the sync command before dropping the cache. Doing this will ensure that all memory in the cache is updated and all dirty pages are synchronized before dropping the cache. You can safely skip this step but if you have any dirty pages in your disk cache the system will refuse to release them.
    # sync

    The next step is echoing “3” to the /proc/sys/vm/drop_caches file which will signal the OS to release the pagecache, dentries and inodes.
    # echo 3 > /proc/sys/vm/drop_caches

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
    Previous ArticleExtract the contents of an RPM package
    Next Article Remove the envelope icon from the Gnome indicator applet

    Related Posts

    Fix insync Gnome Shell extension error on Ubuntu

    Netflix now working on Ubuntu Linux

    Safely and atomically change a symlink target

    Most Commented
    March 12, 2009

    Fix blue tinted video in Ubuntu

    September 10, 2010

    Setup SSH access between VirtualBox Host and Guest VMs

    March 8, 2011

    Install GNOME Shell in Ubuntu 10.10 Maverick

    April 4, 2009

    Setup the PS3 Bluetooth Controller on Ubuntu

    October 22, 2008

    How to correctly use LD_LIBRARY_PATH

    Recent Comments
    • Execute command on linux virtual machine (or server) from windows commandline on Setup SSH access between VirtualBox Host and Guest VMs
    • Solved: How to SSH to a VirtualBox guest externally through a host? - Daily Developer Blog on Setup SSH access between VirtualBox Host and Guest VMs
    • How to SSH to a VirtualBox guest externally through a host? [closed] – Code D3 on Setup SSH access between VirtualBox Host and Guest VMs
    • How to copy and paste from VirtualBox? [duplicate] on Setup SSH access between VirtualBox Host and Guest VMs
    • Jackie Laguna on Fix OpenGL: ChoosePixelFormat SketchUp error in WINE
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.