该命令之间的区别是什么(如果有的话):
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
只是一个都市传说?
6
“清洁都只是城市传说吗?” 是的先生。
—
Braiam 2014年