Fix Package Manager Issues

Here are ways to resolve installation, update, upgrade, and other package-related issues.

System-wide packages (APT/DPKG)

If your system complains about a failed upgrade, package manager conflicts, broken packages, or other package-related issues, there are several common fixes to these problems.

You can resolve some package manager issues with a graphical app, but many require the command line. If you see a red circle in the panel indicators, try opening the Terminal (Zorin Menu → Utilities → Terminal) and running these commands to fix the package manager:

sudo apt clean
sudo apt update
sudo dpkg --configure -a
sudo apt install -f
sudo apt full-upgrade
sudo apt autoremove --purge

What do these commands do?

  • sudo …
    This prefix runs the following command with administrator privileges. This is required when making changes to the system packages.
  • apt clean
    Clears out previously retrieved package files from the system’s local cache.
  • apt update
    Fetches indexes from all configured sources. Other apt options use these indexes to determine which packages can be upgraded or installed.
  • dpkg --configure -a
    Configures any unpacked but not yet configured packages.
  • apt install -f
    The -f option attempts to correct broken dependencies
  • apt full-upgrade
    In addition to downloading and installing package updates, this downgrades or removes dependencies as necessary when upgrading packages.
  • apt autoremove --purge
    Running this command with no specified package will remove any packages that were previously dependencies for other installed packages but are no longer required (either because the dependent package was removed, or because the package was updated to no longer depend on certain packages.)

Fix individual packages

Sometimes, you may see some packages that are still broken and need to be installed manually or purged manually. There may be broken dependencies or cyclical dependencies. If so, these commands can help:

Use this command to reinstall the package, replacing “package-name” with its correct name. This can be convenient when the package has many reverse dependencies:

sudo apt install --reinstall package-name

If that didn’t resolve the issue, you can use this command to remove the package and its system-wide configuration files:

sudo apt purge package-name

Reinstall the package with this command:

sudo apt install package-name

Remote repositories can’t be reached

If the Software Updater app or Terminal indicates that some remote repositories can’t be reached, you may have added a third-party software repository that is either configured incorrectly or is experiencing server errors. To resolve this issue, please follow these steps:

  1. Open the Zorin Menu → System Tools → Software Updater.
  2. After the Software Updater has finished checking for updates, click on “Settings…”.
  3. Navigate to the “Other Software” tab.
  4. Find the broken third-party repositories in the list.
  5. Search for the software vendor on the web to determine what has happened to their repository server.
  6. Either remove the repository from the list or edit its address. You may need to change the version codename of the repository (xenial, bionic, focal, etc.) to match the current version of the operating system. The correct version codename for Zorin OS 16 should be “focal”.
  7. Close the “Software & Updates” window and agree to “Reload” the package sources when prompted.

Useful apps

The Synaptic Package Manager app is a powerful graphical frontend for the APT package manager. You can install, remove, selectively upgrade, or pin packages and gain information about their purpose and dependencies. It also provides a comprehensive list of available packages and apps that you can download.

Learn more about the Synaptic Package Manager ›

Flatpak packages

If the Software store is showing available updates, but can’t install them after clicking the “Update All” button, there may be Flatpak runtimes (backend software that other Flatpak packages depend on) with updates available.

Open the Terminal and run these three commands to update all Flatpaks and remove any Flatpak runtimes that are no longer required by any installed app:

flatpak update
flatpak uninstall --unused
flatpak repair --user

Snap packages

Snaps usually update themselves as needed. However, if you would like to manually update the Snaps on your system, run these two commands:

snap refresh --list
sudo snap refresh 

Run this command to remove a Snap package, replacing “package-name” with its correct name:

sudo snap remove package-name