安装所需的磁盘空间大于删除后释放的磁盘空间:为什么?

安装所需的磁盘空间大于删除后释放的磁盘空间:为什么?

我安装了 OBS Studio:

sudo apt-get install obs-studio 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-keybinder-3.0 libkeybinder-3.0-0
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libfdk-aac0 libluajit-5.1-2 libluajit-5.1-common libxcb-xinerama0
The following NEW packages will be installed:
  libfdk-aac0 libluajit-5.1-2 libluajit-5.1-common libxcb-xinerama0 obs-studio
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,678 kB of archives.
After this operation, 13.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

我决定删除它:

sudo apt-get --purge remove obs-studio Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-keybinder-3.0 libfdk-aac0 libkeybinder-3.0-0 libluajit-5.1-2
  libluajit-5.1-common libxcb-xinerama0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  obs-studio*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 11.6 MB disk space will be freed.
Do you want to continue? [Y/n] 

当我移除它时,我期望13.0 MB需要释放的磁盘空间,因为这是安装所需的,但我得到了11.6 兆磁盘空间却被释放:为什么?

答案1

不同之处在于:

The following additional packages will be installed:
  libfdk-aac0 libluajit-5.1-2 libluajit-5.1-common libxcb-xinerama0

卸载后,如果没有其他软件包依赖于它们,则obs-studio可以删除这些软件包。apt-get autoremove

你也可以运行:

sudo apt-get remove --purge obs-studio libfdk-aac0 libluajit-5.1-2 libluajit-5.1-common libxcb-xinerama0

您应该直接获得原始尺寸。

答案2

因为不是所有东西都会被删除。请注意,软件包需要安装几个库,其中包括libluajit-5.1-2。在卸载过程中,只会删除软件包本身,并提示您使用autoremove以摆脱未使用的其他软件包。再次阅读卸载提示。配置文件也可能不会被删除。对于完全删除,有时--purge建议使用选项。

至于为什么这样做,我只能猜测这是一种保护功能,因为各种软件都依赖于库和 API,因此促使系统管理员手动删除它们是一种明智的做法,以确保这正是他们想要的。或者换句话说,以防万一。

相关内容