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