How to Completely Uninstall FFmpeg from Linux

This article provides a comprehensive, step-by-step guide on how to completely remove FFmpeg from your Linux distribution. Whether you installed it via a native package manager like apt, dnf, or pacman, or compiled it directly from the source code, we will cover the exact commands needed to purge the application, its configuration files, and any leftover dependencies from your system.

Step 1: Remove FFmpeg via Package Managers

Most users install FFmpeg through their distribution’s official repositories. Find your specific Linux distribution below to run the appropriate command.

Ubuntu / Debian / Linux Mint

On Debian-based systems, using the purge command ensures that both the application and its associated configuration files are deleted.

sudo apt-get purge ffmpeg

After removing the main package, clean up any orphaned dependencies and configuration files that are no longer needed:

sudo apt-get autoremove --purge
sudo apt-get clean

Fedora / RHEL / CentOS

On distributions that utilize the DNF package manager, you can remove the package and its unused dependencies simultaneously:

sudo dnf remove ffmpeg

Arch Linux / Manjaro

To remove FFmpeg along with its dependencies (provided those dependencies are not required by any other installed packages) on Arch-based systems, use:

sudo pacman -Rns ffmpeg

Step 2: Remove FFmpeg Installed via Snap or Flatpak

If you installed FFmpeg as a universal package, standard package managers won’t detect it. You must use the corresponding package manager commands.

For Snap Installations

sudo snap remove ffmpeg

For Flatpak Installations

flatpak uninstall ffmpeg

Step 3: Remove FFmpeg Compiled from Source

If you manually compiled and installed FFmpeg from the source code, it will not appear in any package manager.

  1. Navigate back to the original source directory where you built the software (the folder containing the Makefile).
  2. Run the uninstallation command:
sudo make uninstall
  1. If you have already deleted the source folder, you will need to manually delete the binary and configuration files from your system directories (typically found in /usr/local/bin/ffmpeg, /usr/local/share/ffmpeg, or /usr/bin/ffmpeg).

Step 4: Verify the Complete Removal

To ensure that FFmpeg has been entirely wiped from your system, attempt to check its version in the terminal:

ffmpeg -version

If the uninstallation was successful, your terminal should return a message stating: bash: /usr/bin/ffmpeg: No such file or directory or command not found.