Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

Fixing “unzip: command not found” on Ubuntu and Debian

The reliable fix for “unzip: command not found” is to refresh APT, install the exact unzip package, verify the executable, and then extract your ZIP file. This guide covers Ubuntu and Debian commands, apt versus apt-get, repository failures, release availability, and post-install checks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Ubuntu or Debian prints unzip: command not found, the shell cannot locate the unzip executable. Install the repository package, refresh APT’s package index first, then verify the command:

sudo apt update
sudo apt install unzip
command -v unzip
unzip -v

After that, extract an archive with unzip archive.zip. The same package name and basic sequence apply to both distributions.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “unzip: command not found” means

unzip is a package-managed executable, not a shell built-in. When you type unzip, the shell searches the directories in its PATH for a matching executable. The message means no usable unzip program was found there. It does not, by itself, indicate that the ZIP file is corrupt.

On Ubuntu and Debian, the supported package is also named unzip. APT obtains that package from the distribution’s configured repositories, installs it, and resolves any required dependencies. You do not need a separate download from an archive-utility website for this fix.

The direct fix

Interactive Ubuntu or Debian installation with apt

  1. Refresh the local package lists:
    sudo apt update
  2. Install the package:
    sudo apt install unzip
  3. Confirm that the executable is now discoverable:
    command -v unzip
  4. Ask the program to print its version information:
    unzip -v

sudo apt update downloads current package-list metadata from the repositories configured on the machine. Running it before installation prevents APT from relying on stale metadata. The Ubuntu server documentation recommends APT for installing Debian packages and documents this index-refresh step.

Using apt-get

The equivalent commands are:

sudo apt-get update
sudo apt-get install unzip

Debian distinguishes the interfaces by use case: apt is intended for interactive operations, while apt-get is the more stable choice for scripts. Both commands install the same package when they use the same configured repositories.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the installation before opening the archive

Run the checks separately so you can tell whether a package problem or an archive problem is responsible for the next error.

  • command -v unzip should print the path of the executable. If it prints nothing, the shell still cannot find it.
  • unzip -v should display the installed program’s version and build information. If the shell again says the command is not found, installation did not complete or the executable is outside the current PATH.

Once verification succeeds, extract the file by supplying its name:

unzip archive.zip

Replace archive.zip with the actual filename. If the name contains spaces, quote it, for example unzip "project backup.zip". Run the command from the directory containing the archive, or provide an absolute or relative path to the file.

The Debian Project’s official manpage describes the utility this way: “unzip will list, test, or extract files from a ZIP archive, commonly found on MS-DOS systems.” The command therefore has uses beyond extraction, including inspecting or testing an archive before writing files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ubuntu and Debian: what differs and what does not

Question Ubuntu Debian
Package name unzip unzip
Interactive installation sudo apt update, then sudo apt install unzip sudo apt update, then sudo apt install unzip
Script-oriented interface apt-get is available Debian recommends apt-get for scripts and apt for interactive use
Repository configuration APT reads repository definitions under /etc/apt/sources.list.d/; older releases commonly also use /etc/apt/sources.list APT likewise depends on configured repository definitions and downloaded package lists
Release availability Depends on the Ubuntu release and enabled repositories The package search lists unzip in suites including bullseye, bookworm, trixie, forky, and sid

The package name and installation sequence are not different merely because the distribution is Ubuntu rather than Debian. The practical distinction is which repositories your particular release has enabled and whether you are typing commands interactively or embedding them in automation.

Why apt update comes first

APT keeps a local index of packages available from configured repositories. The index is not the package itself; it is the metadata APT uses to locate a package and determine its dependencies. apt update fetches fresh package lists. apt install unzip then uses those lists to locate and install the package by name.

If you skip the refresh, an older installation may still work, but a newly installed or recently reconfigured system can fail to locate a package that is present in its repositories. Refreshing the index is also the first recovery step after changing repository definitions or reconnecting a machine to the network.

When APT says it cannot locate unzip

An error such as “Unable to locate package unzip” usually means APT’s local metadata does not contain the package for the repositories currently configured. It is different from the original shell message: the shell error occurs before installation, while the APT error occurs during installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Check that the machine has network access. APT must reach its configured repository servers to download package lists and packages.
  2. Refresh the lists again:
    sudo apt update

    Read the output for repository or connectivity errors rather than proceeding immediately to installation.

  3. Inspect the repository definitions under /etc/apt/sources.list.d/. On older Ubuntu releases, also inspect /etc/apt/sources.list. Confirm that the standard repositories for your distribution and release are enabled.
  4. After correcting a repository definition, run the update again and retry:
    sudo apt install unzip

Ubuntu’s documentation explains that its APT index is built from repository definitions in these locations. Debian likewise requires package lists to be fetched before installation can select packages from the repositories.

If installation appears to succeed but the command is still missing

Check the exact result of the install

APT may stop because of a repository error, an interrupted transaction, or a prompt that was not accepted. Scroll back through the command output and confirm that the package was actually installed. A successful return to the shell is not enough if the output reports an error earlier in the transaction.

Start a new shell check

Run command -v unzip and unzip -v again in the same terminal. If another shell or user is being used, repeat the check there; each environment can have a different PATH. Do not copy a path from another machine, because executable locations can vary by installation.

Distinguish a missing command from a missing archive

If unzip -v works but unzip archive.zip reports that the file cannot be found, the package is installed. Check the archive filename and the directory from which you are running the command. The original “command not found” issue has already been resolved in that situation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Using the utility after installation

Extract a ZIP file

Use the archive path as the argument:

unzip archive.zip

The files are extracted relative to your current working directory unless the archive contains its own directory paths. Choose a destination directory deliberately when working in a project or system location, and make sure your user can write there.

Inspect or test before extracting

The Debian manpage identifies listing and testing as well as extraction as functions of unzip. Use the installed command’s own help and manpage on your system to see the exact option syntax available in your release:

unzip -h
man unzip

This is preferable to copying options from an unrelated operating system or a different version. The package version available to you is determined by your configured repositories.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Package versions and release support

Package versions change as Ubuntu and Debian publish updates. Debian’s package search lists unzip in suites including bullseye, bookworm, trixie, forky, and sid, but suite contents and versions are time-sensitive. Use the repositories configured for your release rather than pasting a version number from an old tutorial.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The command to install the current candidate remains simply:

sudo apt install unzip

APT selects the version that matches your enabled repositories and package policy. If your system is pinned to a particular release or uses a restricted mirror, the available version may differ from another Ubuntu or Debian installation.

Common mistakes to avoid

  • Installing a package with a different name: the required package is exactly unzip, not a similarly named archive manager.
  • Running only the install command on a stale system: refresh with sudo apt update first.
  • Assuming a ZIP download installs its own tool: downloading archive.zip gives you data; it does not install the unzip executable.
  • Testing the wrong filename: verify the archive’s spelling, capitalization, and location after the command itself has been verified.
  • Copying a release-specific package version: package availability changes between suites and over time; let APT choose from your configured sources.
  • Ignoring repository output: if apt update reports disabled, unreachable, or invalid sources, fix those messages before retrying the installation.

A repeatable recovery checklist

  1. Confirm the symptom is the shell error unzip: command not found, rather than an error about a particular archive.
  2. Refresh package metadata with sudo apt update.
  3. Install the exact package with sudo apt install unzip, or use the corresponding apt-get commands in a script.
  4. Verify discovery using command -v unzip.
  5. Verify execution using unzip -v.
  6. Run unzip archive.zip with the correct path and filename.
  7. If APT cannot locate the package, check network access and the repository definitions in /etc/apt/sources.list.d/ and, where applicable, /etc/apt/sources.list; refresh the index and try again.

Following those steps addresses both stages of the problem: making the package available to APT and making the installed executable available to the shell. Once command -v unzip returns a path and unzip -v runs, any remaining failure concerns the archive path, permissions, or archive contents rather than the missing-command condition.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.