Telegram is a popular messaging application that emphasizes speed, security, and cross-platform accessibility. It provides features such as encrypted messaging, large file sharing, and cloud-based storage, making it a versatile communication tool for both personal and professional use. With Telegram, users can participate in large group chats, utilize bots for automation, and enjoy a seamless experience across various devices, from desktops to mobile phones.
On Debian 12 and 11, Telegram can be installed using two primary methods. The first method is via Debian’s default repository, which provides a stable and easy-to-install version of Telegram. This method ensures that the application is well-integrated into the Debian system, with straightforward updates through the package manager. Alternatively, Telegram can be installed via Flatpak from Flathub, offering a sandboxed environment that may appeal to users who prefer additional isolation and the flexibility of accessing potentially newer versions of the app. This guide will walk you through both installation methods, allowing you to choose the one that best fits your needs.
Method 1: Install Telegram via APT
Update Debian Before Telegram Installation
Before installing Telegram, update your Debian system’s packages to ensure you have the latest software versions and security patches. Use Debian’s APT, a package manager that makes software management easy on Debian-based systems.
Run the following commands to update:
sudo apt update
sudo apt upgrade
sudo lets regular users run commands with root permissions. The “apt update” command refreshes the package lists, while “apt upgrade” updates all packages on your system.
Install Telegram Desktop Client on Debian via APT Command
After updating your system, you can install the Telegram client. This guide uses the APT repository provided by Debian for a stable and secure version of Telegram.
To install Telegram, use the following command:
sudo apt install telegram-desktop
This command installs the Telegram package on your Debian system.
Method 2: Install Telegram via Flatpak and Flathub
The alternative method for installing Telegram on Debian is using the Flatpak package manager and Flathub, a popular Linux app store. Debian doesn’t have Flatpak installed by default, so you’ll first set up Flatpak, enable Flathub, and then install Telegram.
Ensure Flatpak is Installed
The first step in this process necessitates installing Flatpak on your Debian system. If you have not yet installed Flatpak, now is the perfect time. You can refer to our comprehensive guide titled “How to Install Flatpak and Enable Flathub on Debian Linux” to learn about the Flatpak installation process in detail.
Activate Flathub For Telegram
After installing Flatpak, the next step is to activate Flathub. Flathub hosts many Linux applications, including Telegram. By enabling Flathub, you can access and install these apps on your Debian system using Flatpak.
Run the following command in your terminal to add Flathub as a repository to your Flatpak installation:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
This command adds Flathub to your Flatpak setup. The –if-not-exists parameter prevents an error if Flathub is already set up on your system.
Install Telegram Desktop Client via Flatpak Command
Now that you’ve set up Flathub, you can install Telegram using Flatpak on Debian. Execute the following command to do this:
flatpak install flathub org.telegram.desktop -y
This command tells Flatpak to install Telegram from the Flathub repository. The -y option confirms ‘yes’ to all prompts, letting the installation proceed without further user input.
Initiating Telegram UI
You’ll want to start the application after installing the Telegram client on your Debian system. There are two ways to launch Telegram: via the terminal or the graphical interface.
CLI Methods to Launch Telegram
The terminal lets you start Telegram with a command. Type and execute the following:
telegram
If you used Flatpak for installation, use this command instead:
flatpak run org.telegram.desktop
Graphical User Interface (GUI) Method to Launch Telegram
Debian’s graphical interface offers an intuitive way to launch apps if you prefer not to use the terminal.
Find Telegram by following this path on your desktop:
Activities > Show Applications > Telegram
Additional Telegram Commands
Update Telegram
Keeping your applications current is essential for system security and new features. On Debian Linux, you have two main ways to update Telegram: APT and Flatpak.
APT Update Method for Telegram
APT is Debian’s primary package manager. It gets and installs packages from the repositories listed in your system. To update Telegram and all other packages, run:
sudo apt update
sudo apt upgrade
Flatpak Update Method for Telegram
Flatpak is a universal package system for Linux. It manages apps and their dependencies. Telegram updates using Flatpak usually happen automatically when you log in. But if you want to check for updates yourself, run:
sudo flatpak update
Remove Telegram
You might want to remove Telegram to clean up or fix a problem. You can do this using either the APT or Flatpak methods.
APT Remove Method for Telegram
To delete Telegram installed with APT and its additional packages, use:
sudo apt remove telegram-desktop
This doesn’t delete local user data. If you want to remove that too, you have to manually delete the ~/.local/share/TelegramDesktop directory:
rm -r ~/.local/share/TelegramDesktop
Flatpak Remove Method for Telegram
If you installed Telegram using Flatpak, uninstall it with:
flatpak uninstall org.telegram.desktop
This removes the Telegram app and its data. But it doesn’t delete user data in your home directory. If you want to remove this data, manually delete the ~/.local/share/TelegramDesktop directory.
Closing Thoughts
Installing Telegram on your Debian system through either the default repository or Flatpak provides a reliable and secure messaging platform that fits seamlessly into your workflow. The Debian repository method offers stability and ease of integration, while the Flatpak option provides enhanced security and potential access to newer versions. Both methods ensure that you can fully leverage Telegram’s features, keeping your communications fast, secure, and synchronized across all your devices on Debian.