删除旧版本内核
uname
-s, --kernel-name
-r, --kernel-release
[root@paly ~]
2.6.32-754.35.1.el6.i686
[root@paly ~]
dracut-kernel-004-411.el6.noarch
kernel-firmware-2.6.32-754.35.1.el6.noarch
kernel-2.6.32-754.35.1.el6.i686
kernel-headers-2.6.32-754.35.1.el6.i686
kernel-2.6.32-754.27.1.el6.i686
[root@paly ~]
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package kernel.i686 0:2.6.32-754.27.1.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Removing:
kernel i686 2.6.32-754.27.1.el6 @updates 97 M
Transaction Summary
======================================================================================================================================================
Remove 1 Package(s)
Installed size: 97 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Repository base is listed more than once in the configuration
Erasing : kernel-2.6.32-754.27.1.el6.i686 1/1
warning: erase unlink of /lib/modules/2.6.32-754.27.1.el6.i686/modules.order failed: No such file or directory
warning: erase unlink of /lib/modules/2.6.32-754.27.1.el6.i686/modules.networking failed: No such file or directory
warning: erase unlink of /lib/modules/2.6.32-754.27.1.el6.i686/modules.modesetting failed: No such file or directory
warning: erase unlink of /lib/modules/2.6.32-754.27.1.el6.i686/modules.drm failed: No such file or directory
warning: erase unlink of /lib/modules/2.6.32-754.27.1.el6.i686/modules.block failed: No such file or directory
Verifying : kernel-2.6.32-754.27.1.el6.i686 1/1
Removed:
kernel.i686 0:2.6.32-754.27.1.el6
Complete!
[root@paly ~]
dracut-kernel-004-411.el6.noarch
kernel-firmware-2.6.32-754.35.1.el6.noarch
kernel-2.6.32-754.35.1.el6.i686
kernel-headers-2.6.32-754.35.1.el6.i686
[root@paly ~]
查看存储情况
[root@paly /]#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_ton-lv_root
19G 8.8G 8.5G 51% /
tmpfs 249M 0 249M 0% /dev/shm
/dev/sda1 477M 29M 423M 7% /boot
/dev/sda5 988M 161M 775M 18% /mnt/test
[root@paly /]# du -sh * | sort
du: cannot read directory `home/test/public': No such file or directory
du: cannot read directory `misc/cd': No such file or directory
du: cannot access `proc/23485/task/23485/fd/4': No such file or directory
du: cannot access `proc/23485/task/23485/fdinfo/4': No such file or directory
du: cannot access `proc/23485/fd/4': No such file or directory
du: cannot access `proc/23485/fdinfo/4': No such file or directory
0 misc
0 net
0 proc
0 sys
13M sbin
168K dev
16K lost+found
181M mnt #挂载文件
192M lib
20K tmp
2.4G root #根用户数据
2.5G home #用户数据
27M boot
29M etc #配置文件
3.1G usr #程序文件
4.0K cgroup
4.0K media
4.0K opt
4.0K selinux
4.0K srv
569M var #日志及临时文件
7.6M bin
[root@paly /]#
[root@paly ~]#pwd
/root
[root@paly ~]#du -h --max-depth=1 #这里查看root为啥这么大,du看当前一级目录的使用情况
16K ./.cmake
8.0K ./.vim-fuf-data
8.0K ./.lftp
4.0K ./Mail
108K ./.cache
4.0K ./backup
12K ./root
289M ./php-5.5.10
1.1M ./linux-0.11
1.9G ./mysql-5.6.49
41M ./busybox-1.20.2
4.0K ./git
16K ./.ssh
37M ./.vim
12K ./.config
20K ./code_C++
8.0K ./.pki
134M ./test
2.4G .
[root@paly ~]#
这里可以看到当年编译留下的php及mysql安装包很占内存,由于是安装包删除,记录好对应版本就可以删除了。
清除缓存
#清除buffer
[root@paly ~]#echo 1 > /proc/sys/vm/drop_caches
处理日志
待写
|