Start your 3-day free trial
Sign up to experience all premium features at no cost.
*Available only to new users. Each user is limited to one trial.


To install a DEB file on Ubuntu safely, verify where it came from, inspect its architecture and package metadata, then let APT install the local file with sudo apt install ./package.deb. The ./ matters: it tells APT that you mean a file in the current directory. Read the proposed dependencies and changes before confirming, then verify the installed package and keep the original error if installation fails.
Key Takeaways
- A DEB file is an installable package, not proof that its publisher or contents are trustworthy.
- Prefer APT for a local DEB because it can resolve dependencies from your configured repositories.[1]
- Inspect the package name, version, architecture, and metadata before granting administrator access.
- Stop if the plan removes unrelated packages, replaces unexpected system files, or asks you to bypass authentication.
For format selection rather than installation, see the comparison of Linux package and distribution options. The broader Device and App Troubleshooting Guide explains the evidence-first workflow used here.
Confirm that the download page belongs to the publisher and that the file is intended for your Ubuntu release. Keep the page, filename, and any verification instructions open.
Run dpkg --print-architecture, then compare the result with the build offered by the publisher. Do not force an incompatible architecture.
Inspect the archive with dpkg-deb --info and dpkg-deb --field. Match the package name, version, architecture, maintainer, and dependencies to the publisher's description.
Install it with sudo apt install ./package.deb. Do not substitute a network-to-shell command or an authentication bypass.
Read the complete APT plan before confirming. Cancel if it proposes unexplained removals, downgrades, repository changes, or replacement of unrelated system components.
Check the package name, version, architecture, and configured status with dpkg-query; then test the documented program or service entry point.
If verification fails, preserve the full error and package state. Diagnose that category before retrying; if removal is necessary, simulate the removal and review it first.
This order separates trust, compatibility, transaction review, and outcome verification. A successful command exit does not prove that the downloaded publisher was genuine, and a plausible metadata record does not prove that installation completed correctly. Treat the sudo prompt as the last approval boundary: by that point you should know what file you obtained, what package it claims to be, what APT plans to change, and how you will verify or remove it.
Download it from the software publisher's official HTTPS site or a repository that the publisher documents. Confirm the domain, product name, supported Ubuntu releases, and whether the publisher provides a checksum or signature instructions. A checksum copied from the same compromised download location detects transfer damage, but it does not independently prove publisher identity.
Do not install a package forwarded through chat, hosted on an unfamiliar mirror, or presented by an advertisement pretending to be a download button. Avoid instructions that pipe a network response directly into a shell. A local file still receives substantial system access when installed, so knowing the publisher is more important than the .deb suffix.
Keep the original filename and download page until verification is complete. If the vendor publishes separate builds, choose the one for your Ubuntu release and CPU architecture instead of assuming the newest file fits every machine.
First ask Ubuntu for the machine architecture:
dpkg --print-architecture
Then inspect the downloaded archive without installing it:
dpkg-deb --info ./package.deb
dpkg-deb --field ./package.deb Package Version Architecture Maintainer Depends
Replace package.deb with the actual filename. Compare Architecture with the machine result. all is commonly used for architecture-independent packages; another value must be compatible with the system and any deliberately configured foreign architecture. Also check that the package name, version, maintainer, and dependency list match the publisher's description.
The dpkg manual documents package information and status operations, while also distinguishing dpkg's low-level role from dependency retrieval.[2] Metadata can reveal an obvious mismatch, but it is supplied by the package creator and is not a security endorsement.
Change to the directory containing the verified file, refresh repository indexes if appropriate for your normal maintenance window, and run:
sudo apt install ./package.deb
APT recognizes the local path and can obtain required dependencies from repositories already configured on the system. Ubuntu's package-management guidance recommends APT for normal package work and warns that software from non-standard sources can introduce conflicts or security risk.
Before answering yes, read the entire plan. Check the package name, new dependencies, upgraded packages, removals, download size, and disk-space change. Cancel if the plan removes a desktop environment, kernel, security component, or unrelated application you did not intend to change. Investigate instead of adding options that suppress authentication or force the transaction.
dpkg -i ./package.deb can unpack and configure a package but does not automatically fetch missing dependencies. It is useful in specific administrative workflows, not the unconditional first choice for a downloaded local package.
Use the package name shown by dpkg-deb --field, not the filename:
dpkg-query -W -f='${Status}\n${Package} ${Version} ${Architecture}\n' package-name
apt-cache policy package-name
The status should say the package is installed and configured. Compare its version and architecture with what you reviewed. Then launch the program through its documented entry point or check its documented service status. Do not treat a desktop icon alone as proof that dependencies and configuration completed successfully.
If the package adds a repository for later updates, inspect that repository's documented owner and signing setup. Do not accept a newly added source merely because the first installation finished.
Preview the removal first:
apt-get --simulate remove package-name
Review the package list, then use the normal package manager if the plan is limited to what you expect:
sudo apt remove package-name
Removal generally keeps package configuration; purge also removes packaged configuration and should be used only when you have decided that is necessary. User files in a home directory may remain either way. Do not manually delete files from system directories to imitate an uninstall.
Keep the complete error and separate its category before changing anything:
For a dependency or package-manager error, continue with the guide to APT errors and dependency recovery. Do not repeatedly rerun installation with broader force flags; each failed attempt can make the original cause harder to see.
Trust the publisher before trusting the package. Inspect the DEB's architecture and metadata, install the local path through APT, review every proposed change, and verify the package name and version afterward. If the transaction fails, preserve the error and repair the specific package-management state rather than bypassing authentication or forcing files into place.
It can invoke a legitimate graphical installer, but it does not verify the publisher for you. Source and metadata checks still apply, and a terminal APT plan is often easier to review precisely.
./?The prefix identifies a local path. Without it, APT normally interprets the text as a package name to find in configured sources.
dpkg -i wrong?No. It is a lower-level operation with valid administrative uses, but it does not automatically download missing dependencies. APT is usually the safer first path for a local DEB on an online Ubuntu system.
Yes. The format does not establish trust, and package installation can modify system files or run maintainer scripts. Use an official publisher and inspect the plan.
amd64 package require?It is intended for the 64-bit x86 architecture. Confirm with dpkg --print-architecture; do not infer architecture from the computer's marketing name.
Package removal normally targets package-managed files. Application data in your home directory may remain, but behavior varies, so back up valuable data and read the application's documentation.
No. An authentication failure is evidence to verify the source, repository, clock, and signing setup. Bypassing it removes a safety boundary rather than repairing the cause.
Disclaimer: Commands and package behavior can vary with Ubuntu release, repository configuration, and vendor packaging. Back up important data and review administrator-level changes before confirming them.
Sources:
Sources checked 27 August 2026.
Related Articles:
Sign up to experience all premium features at no cost.
*Available only to new users. Each user is limited to one trial.





