如果有的话,此命令与以下命令有何区别:
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
只是都市传说吗?
答案1
在
sudo apt-get clean all
all
会被忽略,就像您在之后附加的其他内容一样clean
。
例如
sudo apt-get clean my room