问题描述
如果有的话,这个命令之间的区别是什么:
sudo apt-get clean
和这个命令:
sudo apt-get clean all
在我的Lubuntu 12.04系统上,模拟这些命令显示它们的行为完全相同:
ek@Apok:~$ apt-get -s clean
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!
Del /var/cache/apt/archives/* /var/cache/apt/archives/partial/*
Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
ek@Apok:~$ apt-get -s clean all
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!
Del /var/cache/apt/archives/* /var/cache/apt/archives/partial/*
Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
ek@Apok:~$
apt-get
与clean
和clean all
的行为有没有区别?如果是这样,有什么区别,在什么情况下是相关的,我应该如何在两者之间进行选择?如果没有差别,那么为什么clean all
存在?
如果它们相同,那么clean all
仍然有意义,如果clean
通常可以将包名称作为参数。但事实并非如此 – 试图将包名称传递给clean
并不会改变clean
的行为,整个缓存仍然会被删除:
ek@Apok:~$ apt-get -s clean nano
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!
Del /var/cache/apt/archives/* /var/cache/apt/archives/partial/*
Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
但是,这确实让我想知道,如果clean all
可能不存在(并且发生的情况是all
被忽略,就像nano
在上面的例子中那样)。
clean all
只是一个都市传奇?
最佳解决方案
在
sudo apt-get clean all
all
被忽略,就像你在clean
后追加的任何东西一样。
例如,这也是一样的
sudo apt-get clean my room