CentOS7 cleanup Yum cache and free memory methods

Source: Internet
Author: User

Clean up Yum Cache

The yum clean command is cleaned with yum, headers, packages, metadata, Dbcache, plugins, Expire-cache, Rpmdb, all

#清理/var/cache/yum的headers yum clean packages #清理/var/cache/yum下的软件包 yum clean metadata ...
Linux frees up memory

Release the Web cache (to free Pagecache):

1 > /proc/sys/vm/drop_caches

Release catalog entries and indexes (to free dentries and inodes):

2 > /proc/sys/vm/drop_caches

Release Web cache, directory entries and indexes (to free Pagecache, dentries and Inodes):

3 > /proc/sys/vm/drop_caches

Here is my actual data.

[[Email protected] ~]# free-m #查看内存 Total used free shared buff/cache availableMem:4812241201136202Swap:1023283740 [[email protected] ~]# sync; echo 3 >/proc/sys/vm/drop_caches [[email protected] ~] # free-m #从120到186, freed up 66m of memory total used free shared Buff/cache Available mem: 481 209 186 1 85 222 swap: 1023 Span class= "Hljs-number" style= "color: #006666" >283 740  

CentOS7 clean up yum cache and free memory methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.