“apt-get clean”和“apt-get clean all”有何不同?

这个命令之间的区别是什么(如果有的话):

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