Home
» LINUX
»
How to Install a DEB File on Linux with APT or a GUI
How to Install a DEB File on Linux with APT or a GUI
To install a local DEB file on Linux, use APT on Debian, Ubuntu, or another Debian-based distribution. Open a terminal in the folder containing the file and run sudo apt install ./package-name.deb, replacing the example with the actual filename. APT can resolve dependencies from your configured software sources. If you prefer a desktop interface, use your distribution’s software installer or GDebi where available.
Before installing a DEB package
A .deb package is for Debian and compatible systems such as Ubuntu, not every Linux distribution. Fedora and Arch use different formats. Check the publisher’s supported release and architecture (for example, amd64 or arm64); a mismatch can prevent installation.
Download only from the publisher or a repository you trust. Package installation can run administrator-level scripts. If the publisher offers a checksum, compare it before installing. Ubuntu notes that third-party DEBs can have broad access to system resources. Prefer your distribution’s repository when its version fits your needs.
Save the package. Keep the downloaded .deb file somewhere easy to reach, such as your Downloads folder. Note its full filename, including capitalization and version numbers.
Open a terminal in the download folder. On many Linux desktops, press Ctrl + Alt + T, or open Terminal from the applications menu. Then enter:
cd ~/Downloads
ls *.deb
Use the listed filename in the command. Change the path if the package is elsewhere.
Select the downloaded .deb file in Downloads.Use the listed filename in the install command.
Install the local file. The ./ prefix points APT to the current folder:
sudo apt install ./package-name.deb
Replace the placeholder with your filename. For names with spaces, quote the path, such as sudo apt install "./my package.deb". Enter your password if asked. Review the proposed packages; type Y to proceed only when the changes look right.
Wait for completion. APT unpacks the package and available dependencies. If the prompt returns without an error, look for the app in your desktop menu. Output and menus vary.
Review the proposed packages before confirming.Wait for APT to return to the prompt without an error.
Install a DEB file with a graphical installer
Ubuntu Desktop’s App Center can install downloaded DEBs. On other Debian-family desktops, GDebi is an optional graphical installer that can resolve available dependencies; availability and menu labels vary.
Install GDebi if needed. Run sudo apt install gdebi, review the package list, and confirm.
Open the package. In the file manager, right-click the .deb and choose Open With Other Application, then GDebi Package Installer. Wording varies; use your desktop’s default installer if GDebi is unavailable.
Review and install. Check the package name, select Install Package, authenticate when prompted, and wait for completion.
Install GDebi from your configured repositories.Menu names vary by desktop.Check details, then select Install Package.Authenticate to authorize installation.
Use dpkg if you need the lower-level method
dpkg installs a local archive but does not fetch missing dependencies. After using it, ask APT to repair dependency issues:
APT can fetch dependencies from configured repositories, but not packages unavailable for your release. Review its proposed changes. Debian notes that lower-level tools do not handle required dependencies automatically.
Fix common installation problems
File not found: Check the folder with pwd and ls *.deb. Filenames are case-sensitive; use the full path if needed.
Wrong architecture or release: Don’t force it. Get a build that matches your distribution and processor.
Unmet dependencies: Run sudo apt update and retry. If a dependency remains unavailable, get a compatible build from the publisher.
Unexpected removals: Cancel. Recheck the source and package compatibility before proceeding.
Updates depend on the source: APT can update packages from configured repositories, while a standalone download may need manual updates. Follow only trusted publisher instructions.