I'm new to compilation. I'm installing FFmpeg and there's a make distclean (or once there was make clean) after every step. What does it do?

2 Answers 2


Generally the files that can be cleaned are determined automatically by Automake. Of course, Automake also recognizes some variables that can be defined to specify additional files to clean. These variables are MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, and MAINTAINERCLEANFILES.

Editing your automake.am to specify what gets deleted.

If configure built it, then distclean should delete it.


Short answer make distclean (does not work on ALL programs but most) will remove ALL files made by ./configure and ALL files made by make


According to GNU.org,


Delete all files in the current directory (or created by this makefile) that are created by configuring or building the program. If you have unpacked the source and built the program without creating any other files, ‘make distclean’ should leave only the files that were in the distribution. However, there is no need to delete parent directories that were created with ‘mkdir -p’, since they could have existed anyway.

  • I just found private files I made in the directory remains but 'tags' file that I generated by ctags -R * is also removed.
    – Chan Kim
    Nov 25, 2021 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .