我怎样才能让自动删除功能真正地删除东西?

我怎样才能让自动删除功能真正地删除东西?

我正在使用 Ubuntu 18.04。我想清理 /usr/src 目录,但不想按照这里的建议手动执行此操作——清除旧的 Linux 映像后可以安全删除 /usr/src/linux-headers 吗?。但是,运行其中建议的答案(“autoremove”)没有任何效果

(env) myusername@chicommons-laboratory:/var/www/html/web$ ls /usr/src
linux-headers-4.15.0-88  linux-headers-4.15.0-88-generic  linux-headers-4.15.0-96  linux-headers-4.15.0-96-generic
(env) myusername@chicommons-laboratory:/var/www/html/web$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  grub-pc-bin
0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
After this operation, 2987 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 115962 files and directories currently installed.)
Removing grub-pc-bin (2.02-2ubuntu8.14) ...

然而,文件仍然保留......

(env) myusername@chicommons-laboratory:/var/www/html/web$ ls /usr/src
linux-headers-4.15.0-88  linux-headers-4.15.0-88-generic  linux-headers-4.15.0-96  linux-headers-4.15.0-96-generic

并且我的磁盘空间没有变化。

相关内容