![即使我没有安装 flatpak,tty 也会说“-bash:flatpak:找不到命令”。已正确卸载](https://linux22.com/image/191600/%E5%8D%B3%E4%BD%BF%E6%88%91%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85%20flatpak%EF%BC%8Ctty%20%E4%B9%9F%E4%BC%9A%E8%AF%B4%E2%80%9C-bash%EF%BC%9Aflatpak%EF%BC%9A%E6%89%BE%E4%B8%8D%E5%88%B0%E5%91%BD%E4%BB%A4%E2%80%9D%E3%80%82%E5%B7%B2%E6%AD%A3%E7%A1%AE%E5%8D%B8%E8%BD%BD.png)
答案1
Flatpack
在 shell 配置文件中安装一些命令。如果删除:
/etc/profile.d/flatpak.sh
你应该没问题。
另请注意,删除包apt-get remove ...
不会删除包的配置,而是同时apt-get purge ...
删除包和配置(在这种情况下purge
应该删除该文件)。
答案2
正如@Eduardo 说得好,跑步
# apt-get purge flatpak
将删除导致问题的文件。
# apt-get purge flatpak
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
flatpak*
0 upgraded, 0 newly installed, 1 to remove and 103 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 143676 files and directories currently installed.)
Purging configuration files for flatpak (1.2.5-0+deb10u4) ...
与手动删除文件相比,我更喜欢该命令(文件名可能会更改,但 apt 知道它需要知道什么)。
就我而言,该软件包也被删除,但像您一样,配置文件被留下。