囧事一则:不知apt-get能否一键撤销(就像Ctrl+Z)
Tofloor
poster avatar
xliang9550
deepin
2014-03-30 05:50
Author
今天在社区展示Ubuntu 14.04 LTS beta2和LibreOffice,白天刚刚下载好镜像。
连上网络之后,想安装完整的LibreOffice组件,于是输入了这个命令:
sudo apt-get install libreoffice
结果就在我想要按下回车的时候,社区里的一位小朋友来到旁边,在小键盘区敲了个星号,于是命令成了:
sudo apt-get install libreoffice*
我在第一时间没有注意到,按下回车之后输入了提权密码,然后开始下载软件包。因为网速很快,几分钟就下载完了,这时一看日志:下载了350个软件包,总计1.9GB。完全解压安装之后,10GB空间用掉了。当时没有管那么多,继续演示操作,配合刚刚翻译好的文档,并且散发了很多份。
展示结束从社区回来,我现在正在软件包管理器中逐个删除不需要的LibreOffice语言包……
Reply Favorite View the author
All Replies
a287740928
deepin
2014-03-30 18:10
#1
你再sudo apt-get autoremove labreoffice*应该能全部删除,然后再装你需要的
Reply View the author
xliang9550
deepin
2014-03-31 07:11
#2
直接从系统快照镜像中恢复了,并不费时,但是白费了2GB流量,幸亏不是用3G上网……
我服了那位小朋友了。
Reply View the author
electricface
deepin
2014-03-31 17:04
#3
yum 有回滚功能吧,不过没用过。apt 好像没有。
Reply View the author
xliang9550
deepin
2014-03-31 20:14
#4
反正已经重装了,不去纠结那么多。我通过比较Fedora和Ubuntu,也感觉确实yum好用。

话说我当时要是用的3G上网(300MB的套餐),估计网费都够买一套正版Office Pro Plus了……
Reply View the author
zoogar
deepin
2014-04-04 01:30
#5
你再sudo apt-get autoremove labreoffice*应该能全部删除,然后再装你需要的
好像不能。
记得前一阵用“sudo apt-get autoremove libreoffice*”卸载libreoffice,结果发现好像把很多不相关的包都卸载了,比如git。
不知道是不是不能这样用,还是apt的bug。
Reply View the author
BingoLove
deepin
2014-04-04 02:19
#6
[quote]你再sudo apt-get autoremove labreoffice*应该能全部删除,然后再装你需要的
好像不能。
记得前一阵用“sudo apt-get autoremove libreoffice*”卸载libreoffice,结果发现好像把很多不相关的包都卸载了,比如git。
不知道是不是不能这样用,还是apt的bug。[/quote]
应该是apt的bug,被apt坑的多了去了,autoremove的时候一定要看仔细都要删除那些
据说有被删掉桌面的,有被删掉内核的Orz
Reply View the author
a287740928
deepin
2014-04-04 06:12
#7
看来姿势不对啊
Reply View the author