![安装所需的磁盘空间大于删除后释放的磁盘空间:为什么?](https://linux22.com/image/1063903/%E5%AE%89%E8%A3%85%E6%89%80%E9%9C%80%E7%9A%84%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E5%A4%A7%E4%BA%8E%E5%88%A0%E9%99%A4%E5%90%8E%E9%87%8A%E6%94%BE%E7%9A%84%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%EF%BC%9A%E4%B8%BA%E4%BB%80%E4%B9%88%EF%BC%9F.png)
我安装了 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,因此促使系统管理员手动删除它们是一种明智的做法,以确保这正是他们想要的。或者换句话说,以防万一。