Completely uninstalling ffmpeg
Solution 1
It is rather obvious that you installed ffmpeg not from a package. Then you may simply get rid of it by renaming it,
sudo mv /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg_old
and you are now free to install the new package.
Solution 2
The command to remove a package and its dependencies in Ubuntu is "apt-get autoremove package"
See the documentation: here
What this command actually removes will depend on how you installed ffmpeg's dependencies. If the dependencies are manually marked then autoremove will leave them alone. If, however, you installed ffmpeg and let it pull in its dependencies without explicitly installing those then autoremove should remove them without fuss.
So, the command you are likely looking for is - at a terminal prompt - "sudo apt-get autoremove ffmpeg
"
Solution 3
Locate where FFmpeg file is stored. A common place to store FFmpeg is /usr/local/bin/ffmpeg
If not in that directory type: locate ffmpeg
Then use the rm
along with the path it's found
sudo rm /usr/local/bin/ffmpeg
Andrew
Updated on September 18, 2022Comments
-
Andrew almost 2 years
I need help uninstall ffmpeg. The problem is, I can't remember what method I used to install it. But I've already done uninstalling through apt using
sudo apt-get remove ffmpeg libav
. Thing is, even after this, ffmpeg is still useable:$ ffmpeg -version ffmpeg version 0.11.1 built on Jul 26 2013 14:07:44 with gcc 4.7.2 configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100
I'm using the ffmpeg version, not the libav one:
$ ffmpeg ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jul 26 2013 14:07:44 with gcc 4.7.2 ...
I've tried using ffmpeg to convert a short .mp4 video into a .avi video and it still works. The reason I want to uninstall it is so that I can reinstall a newer version that supports the
pattern-type
option. With my current version, I get:Unrecognized option 'pattern_type' Failed to set value 'glob' for option 'pattern_type'
Here's the output of some commands that might help:
$ sudo find / -name 'ffmpeg' -type d /home/andrew/vlc-2.1.0/contrib/src/ffmpeg /home/andrew/OpenCV/opencv-2.4.5/3rdparty/ffmpeg /usr/local/share/ffmpeg $ which ffmpeg /usr/local/bin/ffmpeg $ sudo apt-get remove ffmpeg libav-tools Reading package lists... Done Building dependency tree Reading state information... Done Package 'ffmpeg' is not installed, so not removed Package 'libav-tools' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
Please assist!
-
headkase over 10 yearsAlso, did you compile ffmpeg from source and install it with "make install"? Because if you did then it is not tracked by apt. In that case that is what would lead to the ffmpeg binary still being on your system after the remove command. If you did do that, then if you still have the make files hanging around you can do "make uninstall" to purge the files apt doesn't know about.
-
Andrew over 10 yearsI've already run
sudo apt-get autoremove ffmpeg
, but it says Package 'ffmpeg' is not installed, so not removed. I might've installed it from source, but I can't find where the sources are. Is there any command I can use to find it? -
Andrew over 10 yearsWould it be okay to simply delete it?
sudo rm /usr/local/bin/ffmpeg
-
MariusMatutiae over 10 yearsI think so. I generally have no hesitations to do so, but most people preach the "rename and conquer" strategy. With the new ffmpeg in place, all references to the old one (if they exist, which I doubt) will be transferred to the new version, and the old one will become a ghost.
-
Andrew over 10 yearsThanks! But would you happen to know how to install a version of ffmpeg which will allow me to use the
-pattern_type
option? I just installed Jon Severinsson's version here. Anyway, I'm trying to useffmpeg -f image2 -r 10 -pattern_type glob -i '*.jpg' output.mp4
, but I'm getting the same error as above. -
MariusMatutiae over 10 yearsThis is an interesting question, why don't you post it separately?
-
Andrew over 10 yearsIt's here
-
Elisa Cha Cha over 10 yearsThis does not get rid of all of the libraries (
/usr/(local)/include/libav*
,/usr/(local)/lib/libav*
), man pages, examples, pkgconfig files, preset files, etc. If you still have the source directory from compilation runsudo make uninstall
in it. -
Andrew over 10 yearsSeems like my ffmpeg.c is is in a subdirectory in OpenCV. If I delete the ffmpeg stuff, will OpenCV break?
-
MariusMatutiae over 10 yearsfind /home/your_name -name 'ffmpeg*' -print
-
Andrew over 10 yearsI found it, I had the source code for ffmpeg v0.11 in my OpenCV sources. I was following a guide for installing OpenCV here. I just ran
sudo make install
and that removed ffmpeg for me.