How to use flatpak

From 清冽之泉
Jump to navigation Jump to search

《Flatpak 怎么用》

软件遇到网络 fail,第一步就考虑换个国内源。

# 安装 flatpak
sudo apt install flatpak

# 可选,适用于 Gnome 用户
sudo apt install gnome-software-plugin-flatpak

# 添加官方源
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

# 添加国内源,中科大源
sudo flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub

# 恢复国内源
sudo flatpak remote-modify flathub --url=https://dl.flathub.org/repo

# 安装某个软件
flatpak install flathub com.obsproject.Studio

# 运行某个软件
flatpak run com.obsproject.Studio

# 彻底卸载 flatpak
sudo apt remove --purge flatpak
sudo rm -rf ~/.local/share/flatpak ./.cache/flatpak