/usr目录空间太大---已解决!
Tofloor
poster avatar
153******58
deepin
2013-06-03 00:15
Author
今天突然发现/usr目录已经达到7.3G大小,该怎么作一下清理呢?
印象中我之前使用的系统一直都没超过过4G的样子啊,也没安装太多的软件的啊。
Reply Favorite View the author
All Replies
jhkwei
deepin
2013-06-03 00:25
#1
你是怎么分区的,如果象我,
/ #50G
/home #100G
/opt #50
这时/usr 应该是有/ 一样多的空间差不多30,40G空的。
Reply View the author
cxbii
deepin
2013-06-03 03:39
#2
没安装什么软件的话,
那就是apt更新的缓存多了
终端执行
  1. sudo apt-get clean
Copy the Code
Reply View the author
2048tb.com
deepin
2013-06-03 06:16
#3
软件中心有清理的软件缓存的功能!
Reply View the author
153******58
deepin
2013-06-03 06:48
#4
没安装什么软件的话,
那就是apt更新的缓存多了
终端执行
  1. sudo apt-get clean
Copy the Code
这个我已经执行过了,一般更新过后我都后用这条命令和 apt-get autoclean

还有那个软件中心带的清理缓存功能清理的目录是 /var/cache/apt/archives,
但我用磁盘使用分析扫描过后发现是 /usr/share/deepin-software-center/data/update这个目录占用了很大空间,足有4G之多,不知道这个目录都放了些什么文件。
Reply View the author
r7963
deepin
2013-06-03 07:05
#5
删嘛,不用想了
Reply View the author
lihongwu
deepin
2013-06-03 17:14
#6
楼主用的系统版本是RC吗?
Reply View the author
153******58
deepin
2013-06-03 20:36
#7
是的,用的RC版。
个人也觉得这个目录里的内容应该能删除,就是不确定会不会引起软件中心运行异常。
也想知道里面的东西到底是作什么用的。
Reply View the author
风起
deepin
2013-06-03 20:50
#8
root执行 du -sh /usr/* 看看哪个目录用的多, 清理下
Reply View the author
deepin
2013-06-04 01:09
#9
/usr/share/deepin-software-center/data/update这个是软件中心后端数据目录,你如果用的是RC版,且用test源更新到最新的话,在终端执行一下sudo dsc-update-data.py应该可以解决问题,这个会默认删除无用的数据的。

如果上面方法不行的话,只能手动清理,步骤如下:
1. 终端执行
  1. cat /usr/share/deepin-software-center/data/data_newest_id.ini
Copy the Code
记录data_id,类似bddb656a-0c1c-480f-bed7-ca895816863a。
2. 终端执行
  1. ls /usr/share/deepin-software-center/data/update
Copy the Code
保留名称为data_id的值的文件夹,其他文件夹删除就应该OK了
Reply View the author
153******58
deepin
2013-06-04 07:22
#10
[quote]/usr/share/deepin-software-center/data/update这个是软件中心后端数据目录,你如果用的是RC版,且用test源更新到最新的话,在终端执行一下sudo dsc-update-data.py应该可以解决问题,这个会默认删除无用的数据的。

切换到测试源,然后执行 sudo apt-get upgrade后这个目录自动变小了,只有300~400Mb了。
也没有执行 dsc-update-data.py,不太明白。

不过谢谢各位了。
Reply View the author
deepin
2013-06-04 19:19
#11
[quote]/usr/share/deepin-software-center/data/update这个是软件中心后端数据目录,你如果用的是RC版,且用test源更新到最新的话,在终端执行一下sudo dsc-update-data.py应该可以解决问题,这个会默认删除无用的数据的。

切换到测试源,然后执行 sudo apt-get upgrade后这个目录自动变小了,只有300~400Mb了。
也没有执行 dsc-update-data.py,不太明白。

不过谢谢各位了。
[/quote]

更新的时候软件会自动执行dsc-update-data.py中的清理动作
Reply View the author