To install a trusted local .deb file on Ubuntu, give APT its path: sudo apt install ./example.deb. Replace the filename with the file you downloaded. The ./ tells APT to use a file in the current directory, and APT can obtain compatible dependencies from your configured repositories.
A .deb package can install files and run privileged installation scripts. Obtain it from the software publisher or an authorized package source, and check that the publisher supports your Ubuntu release and processor architecture.
Inspect the package before installation
Open a terminal in the directory containing the download. These examples use example.deb as a placeholder; quote the path if it contains spaces:
pwd
ls -l ./example.deb
dpkg --print-architecture
dpkg-deb --field ./example.deb Package Version Architecture Depends
dpkg-deb --contents ./example.debThe field output identifies the package's actual name, version, architecture and declared dependencies. A package marked all is architecture-independent; otherwise match the publisher's supported build to your environment. Do not force an incompatible architecture to bypass an error.
Inspection lists metadata and files; it does not establish that an untrusted package is safe. If the publisher supplies a checksum or signature through a trusted channel, follow its verification instructions before installation.
Preview the changes, then install
sudo apt update
apt install --simulate ./example.debRead the proposed packages and removals. A simulation previews APT's dependency plan; it does not execute the package's installation scripts or prove that the software will work. If the plan is appropriate, install without an automatic yes flag so you can review the final prompt:
sudo apt install ./example.debIf the filename contains spaces, use a quoted path such as sudo apt install "./example package.deb". Use one intended file rather than a wildcard that might select unrelated downloads. If APT cannot find a repository package, follow the package lookup checklist.
Verify the installed package
Use the package name from the earlier metadata inspection, which may differ from the filename and the command used to launch the application:
dpkg-query -W -f='${Status}\n' package-nameinstall ok installed confirms the package database state. Then follow the publisher's launch or service checks. A package may install a command-line tool or background service without adding a desktop icon. For a missing command, use our Bash lookup guide; for service-manager errors, inspect the Linux environment.
Understand common failures
| Symptom | Check |
|---|---|
| Cannot find the local file | Current directory, spelling, quoting and the explicit ./ or absolute path. |
| Wrong architecture | Compare the package's Architecture field with the supported build for your machine. |
| Dependency cannot be satisfied | Check Ubuntu release compatibility, available repositories and required versions. |
| Package manager is locked | Check for an active update or installation and allow it to finish; deleting a lock file does not safely stop it. |
| No space left on device | Use the storage diagnostic guide. |
What if you already used dpkg -i?
dpkg installs local packages but does not fetch missing dependencies by itself. If the package database is left with broken dependencies, preview APT's proposed repair:
apt --fix-broken install --simulateReview whether APT proposes completing the installation or removing packages. If that plan is acceptable, run sudo apt --fix-broken install. It is not guaranteed to complete the original installation; incompatible or unavailable dependencies may require a different package build.
Removal and updates
To remove the installed package, use its package name:
sudo apt remove package-nameRead the proposed changes first. Installing one local .deb file does not itself guarantee an automatic update source. Some publishers configure a repository during installation; others require a later download. Check the publisher's update instructions and the sources actually configured on your machine.
Graphical installers vary by Ubuntu release and desktop. The APT path above avoids relying on a particular store application's local-file support.
Sources and verification
Tested September 11, 2026 in a disposable Ubuntu 24.04 ARM64 container: built a harmless architecture-independent test package, inspected it, simulated installation, installed it with APT, verified its package state and file, then removed it. No third-party application or desktop installer was tested. This rewrite consolidates two overlapping legacy installation guides.
