mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-28 23:20:10 +08:00
translated
This commit is contained in:
parent
e8395a725e
commit
a8408ad70f
@ -1,131 +0,0 @@
|
||||
[#]: subject: "How to Remove Firefox Snap from Ubuntu (21.10 +)"
|
||||
[#]: via: "https://www.debugpoint.com/remove-firefox-snap-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Remove Firefox Snap from Ubuntu (21.10 +)
|
||||
======
|
||||
|
||||
**Ubuntu 21.10 Impish Indri and the following versions make Firefox Snap a default browser. If you don’t like Snap, this is how you can remove it and use the stock version.**
|
||||
|
||||
There is always a debate about whether Snap is a better alternative to apt. And many users prefer it for their system, and some hates snap to its core. Ubuntu and Canonical consider it as one of the best installation repositories and package management tools for Linux. The primary reason Snap is hated is its slow startup time. However, that argument is for another article.
|
||||
|
||||
### Remove Firefox Snap version from Ubuntu
|
||||
|
||||
So, if you haven’t [heard the story][1], Ubuntu 21.10 (and all subsequent versions) ships Firefox as a Snap package by default. So, when you install Ubuntu 21.10 onwards, the default left-dock shortcut is a snap version of Firefox. And you can verify it using the various methods below.
|
||||
|
||||
![snap list - Firefox][2]
|
||||
|
||||
![Firefox snap desktop shortcut][3]
|
||||
|
||||
If you don’t like Snap due to its [performance, and][4]storage issues, you can remove it via the following commands.
|
||||
|
||||
- Close all the Firefox instances if open.
|
||||
|
||||
- Open a terminal. Then run the below command.
|
||||
|
||||
```
|
||||
sudo snap remove firefox
|
||||
```
|
||||
|
||||
- Wait for the command to complete. This will remove the snap executables from your system and disconnect Firefox from various system services. But the home snap directory will still be there. You can manually remove that using the below command.
|
||||
|
||||
```
|
||||
cd ~/snaprm -r firefox
|
||||
```
|
||||
|
||||
### Install Firefox Alternative Methods
|
||||
|
||||
Now, as you removed Firefox, you have the following options to use this browser.
|
||||
|
||||
#### Method 1 – Use PPA (Recommended)
|
||||
|
||||
- Before using this method, make sure to remove the snap version of Firefox as mentioned above.
|
||||
- There is an [official PPA for Firefox][5], maintained by its development team. You can add this PPA to your software sources and use it to install the latest Firefox.
|
||||
- Make sure to create a file using a text editor to create a preference file to stop Ubuntu from pickup the snap version of Firefox while running the apt update command.
|
||||
|
||||
```
|
||||
sudo gedit /etc/apt/preferences.d/firefox-no-snap
|
||||
```
|
||||
|
||||
- Add the following lines to the above file and save it.
|
||||
|
||||
```
|
||||
Package: firefox*Pin: release o=Ubuntu*Pin-Priority: -1
|
||||
```
|
||||
|
||||
- Use the following commands in sequence. The first command removes it from your system completely.
|
||||
|
||||
```
|
||||
sudo apt purge firefox
|
||||
sudo add-apt-repository ppa:mozillateam/firefox
|
||||
sudo apt-get update
|
||||
sudo apt install firefox
|
||||
```
|
||||
|
||||
- After installation is finished, make sure to enable the auto-upgrade using the command below.
|
||||
|
||||
```
|
||||
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
||||
```
|
||||
|
||||
- Restart your system (optional) and enjoy the deb version of Firefox.
|
||||
|
||||
#### Method 2 – Use the compressed executable of Firefox
|
||||
|
||||
- You can download the compressed Firefox executable for Ubuntu and other Linux from the official website (link below). Then extract it and double-click to run the firefox executable. This is the safest approach. You can still get updates if you use this method.
|
||||
|
||||
[Download Firefox][6]
|
||||
|
||||
![Download Firefox and Extract][7]
|
||||
|
||||
![And then run the executable][8]
|
||||
|
||||
#### Method 3 – Use Flatpak for Firefox
|
||||
|
||||
- You can also use the [Flatpak version of Firefox][9], which is available below after [setting up Ubuntu for Flatpak][10]. Then you can run the below command to install.
|
||||
|
||||
```
|
||||
flatpak install flathub org.mozilla.firefox
|
||||
```
|
||||
|
||||
#### Method 4 – Use Snap with less system coupling with Firefox
|
||||
|
||||
- If you think you can still continue with the Snap version but want less sandboxing in your system, then you may want to reinstall Firefox using the below command with a [classic switch][11].
|
||||
|
||||
```
|
||||
sudo snap install firefox --classic
|
||||
```
|
||||
|
||||
### Closing Notes
|
||||
|
||||
So, this is the step to remove the firefox snap version from Ubuntu 21.10 onwards. And some alternatives. I am inquisitive to find out what step Linux Mint takes, as they don’t go well with Snap. Also, those distros depend on Ubuntu upstream repo for Firefox, It’s interesting to see what they will do. Debian maintains its own repo, but it’s mostly the ESR version.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/remove-firefox-snap-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1943840
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2021/09/snap-list-Firefox.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Firefox-snap-desktop-shortcut-1024x490.jpg
|
||||
[4]: https://www.debugpoint.com/2021/03/clean-up-snap/
|
||||
[5]: https://launchpad.net/~mozillateam/+archive/ubuntu/ppa
|
||||
[6]: https://www.mozilla.org/en-US/firefox/new/
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Download-Firefox-and-Extract.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2021/09/And-then-run-the-executable.jpg
|
||||
[9]: https://flathub.org/apps/details/org.mozilla.firefox
|
||||
[10]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/
|
||||
[11]: https://snapcraft.io/docs/snap-confinement
|
@ -0,0 +1,131 @@
|
||||
[#]: subject: "How to Remove Firefox Snap from Ubuntu (21.10 +)"
|
||||
[#]: via: "https://www.debugpoint.com/remove-firefox-snap-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何从 Ubuntu (21.10 +) 中删除 Firefox Snap
|
||||
======
|
||||
|
||||
**Ubuntu 21.10 Impish Indri 及之后的版本将 Firefox Snap 设为默认浏览器。如果你不喜欢 Snap,可以通过以下方式将其删除并使用库存版本。**
|
||||
|
||||
关于 Snap 是否是 apt 的更好替代品,一直存在争议。而许多用户更喜欢它的系统,也有一些人非常讨厌 snap。 Ubuntu 和 Canonical 认为它是 Linux 的最佳安装仓库和包管理工具之一。 Snap 被讨厌的主要原因是它的启动很慢。然而,这个论点是另一篇文章的内容。
|
||||
|
||||
### 从 Ubuntu 中删除 Firefox Snap 版本
|
||||
|
||||
所以,如果你还没有[听说过这个故事][1],Ubuntu 21.10(和所有后续版本)默认提供 Firefox Snap 包。因此,当你从 Ubuntu 21.10 开始安装时,默认的 left-dock 快捷方式是 Firefox 的 snap 版本。你可以使用以下各种方法对其进行验证。
|
||||
|
||||
![snap 列表 - Firefox][2]
|
||||
|
||||
![Firefox snap 桌面快捷方式][3]
|
||||
|
||||
如果你因为[性能][4]和存储问题而不喜欢 Snap,可以通过以下命令将其删除。
|
||||
|
||||
- 如果打开,那么关闭所有 Firefox 实例。
|
||||
|
||||
- 打开一个终端。然后运行以下命令。
|
||||
|
||||
```
|
||||
sudo snap remove firefox
|
||||
```
|
||||
|
||||
- 等待命令完成。这将从你的系统中删除 snap 可执行文件,并断开 Firefox 与各种系统服务的连接。但是主 snap 目录仍然存在。你可以使用以下命令手动删除它。
|
||||
|
||||
```
|
||||
cd ~/snaprm -r firefox
|
||||
```
|
||||
|
||||
### 安装 Firefox 替代方法
|
||||
|
||||
现在,当你删除 Firefox 时,你可以通过以下选项来使用此浏览器。
|
||||
|
||||
#### 方法 1 – 使用 PPA(推荐)
|
||||
|
||||
- 在使用此方法之前,请确保如上删除了 Firefox 的 snap 版本。
|
||||
- 有一个[官方 Firefox PPA][5],由其开发团队维护。你可以将此 PPA 添加到你的软件源中,并使用它来安装最新的 Firefox。
|
||||
- 确保使用文本编辑器创建一个首选项文件,以阻止 Ubuntu 在运行 apt update 命令时获取 Firefox 的 snap 版本。
|
||||
|
||||
```
|
||||
sudo gedit /etc/apt/preferences.d/firefox-no-snap
|
||||
```
|
||||
|
||||
- 将以下行添加到上面的文件并保存。
|
||||
|
||||
```
|
||||
Package: firefox*Pin: release o=Ubuntu*Pin-Priority: -1
|
||||
```
|
||||
|
||||
- 依次使用以下命令。第一个命令将其从你的系统中完全删除。
|
||||
|
||||
```
|
||||
sudo apt purge firefox
|
||||
sudo add-apt-repository ppa:mozillateam/firefox
|
||||
sudo apt-get update
|
||||
sudo apt install firefox
|
||||
```
|
||||
|
||||
- 安装完成后,请确保使用以下命令启用自动升级。
|
||||
|
||||
```
|
||||
echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
||||
```
|
||||
|
||||
- 重启系统(可选)并享受 deb 版本的 Firefox。
|
||||
|
||||
#### 方法 2 – 使用 Firefox 的压缩可执行文件
|
||||
|
||||
- 你可以从官方网站(下面的链接)下载适用于 Ubuntu 和其他 Linux 的压缩 Firefox 可执行文件。然后解压并双击运行 firefox 可执行文件。这是最安全的方法。如果你使用此方法,你仍然可以获得更新。
|
||||
|
||||
[下载 Firefox][6]
|
||||
|
||||
![下载 Firefox 并解压][7]
|
||||
|
||||
![然后运行可执行文件][8]
|
||||
|
||||
#### 方法 3 – 使用 Flatpak 版本的 Firefox
|
||||
|
||||
- 你也可以使用 [Flatpak 版本的 Firefox][9],这在 [Ubuntu 中设置 Flatpak][10] 后可用。然后你可以运行以下命令进行安装。
|
||||
|
||||
```
|
||||
flatpak install flathub org.mozilla.firefox
|
||||
```
|
||||
|
||||
#### 方法 4 – 使用与系统耦合更少的 Snap 版本 Firefox
|
||||
|
||||
- 如果你认为你仍然可以继续使用 Snap 版本但希望在系统中减少沙盒,那么你可能需要使用以下命令和 [classic 开关][11]重新安装 Firefox。
|
||||
|
||||
```
|
||||
sudo snap install firefox --classic
|
||||
```
|
||||
|
||||
### 结束语
|
||||
|
||||
因此,这是从 Ubuntu 21.10 开始删除 firefox snap 版本的步骤。以及一些替代品。我很想知道 Linux Mint 采取了什么措施,因为他们与 Snap 不兼容。。此外,这些发行版依赖于 Firefox 的 Ubuntu 上游仓库,看看它们会做什么很有趣。 Debian 维护自己的仓库,但主要是 ESR 版本。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/remove-firefox-snap-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1943840
|
||||
[2]: https://www.debugpoint.com/wp-content/uploads/2021/09/snap-list-Firefox.jpg
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Firefox-snap-desktop-shortcut-1024x490.jpg
|
||||
[4]: https://www.debugpoint.com/2021/03/clean-up-snap/
|
||||
[5]: https://launchpad.net/~mozillateam/+archive/ubuntu/ppa
|
||||
[6]: https://www.mozilla.org/en-US/firefox/new/
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Download-Firefox-and-Extract.jpg
|
||||
[8]: https://www.debugpoint.com/wp-content/uploads/2021/09/And-then-run-the-executable.jpg
|
||||
[9]: https://flathub.org/apps/details/org.mozilla.firefox
|
||||
[10]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/
|
||||
[11]: https://snapcraft.io/docs/snap-confinement
|
Loading…
Reference in New Issue
Block a user