由于手册页apt
没有明确说明这个问题,您能否告诉我apt-get
- 清除选项也可以使用apt
。请注意:我指的是选项- 清除而不是命令清除不带两个破折号。
那么,语法:也可以像这样apt-get --purge autoremove
使用:吗?apt
apt --purge autoremove
如果不是,那么等效命令是什么apt
?
谢谢。
答案1
是的。自己尝试一下吧……
$ apt --purge --simulate autoremove
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-5.8.0-43* linux-headers-5.8.0-43-generic*
linux-image-5.8.0-43-generic* linux-modules-5.8.0-43-generic*
linux-modules-extra-5.8.0-43-generic* linux-tools-5.8.0-43*
linux-tools-5.8.0-43-generic*
0 upgraded, 0 newly installed, 7 to remove and 5 not upgraded.
Purg linux-headers-5.8.0-43-generic [5.8.0-43.49]
Purg linux-headers-5.8.0-43 [5.8.0-43.49]
Purg linux-modules-extra-5.8.0-43-generic [5.8.0-43.49]
Purg linux-image-5.8.0-43-generic [5.8.0-43.49]
Purg linux-modules-5.8.0-43-generic [5.8.0-43.49]
Purg linux-tools-5.8.0-43-generic [5.8.0-43.49]
Purg linux-tools-5.8.0-43 [5.8.0-43.49]
该--simulate
标志使得无风险测试变得容易。