# Who the hell is MrProper anyway?

## NicZak

In different books / other sources I have seen that it is reccomended to do a 'make mrproper' before make menuconfig -> make dep && make clean bzImage modules modules_install  ..  As far as I know make mrproper just removes symlinks that the kernel old sources may have created.  My question is basically what is the difference between make mrproper and make clean and when/if at all should one use make mrproper?  Thanks -

NicZak

----------

## Utoxin

Use make mrproper if you have made any change to the kernel source. Be it adding a patch, or installing a new version. It does more than make clean. Not sure how /much/ more, but I know I've had times when the kernel wouldn't compile till I did a make mrproper.

----------

## brain

Basically the rule is, a "make clean" will clean up the src directory...removing any temp files and compiled kernels...

a "make mrproper" wipes the tree clean...removing any changes you've made...in theory, giving you a "clean" tree...just like when it was unzipped.

----------

## lx

 *brain wrote:*   

> a "make mrproper" wipes the tree clean...removing any changes you've made...in theory, giving you a "clean" tree...just like when it was unzipped.

 

Not exactly, make mrproper, doesn't remove my patched files, it just removes a lot of files created by dependsalong with object files etc. So it just look like a clean kernel including all the patches you made, so all sourcecode remain untouched.

FACTS:

```
# files removed with 'make mrproper'

MRPROPER_FILES = \

        .......

   include/linux/autoconf.h include/linux/version.h \

   .version .config* config.in config.old \

   scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \

   scripts/lxdialog/*.o scripts/lxdialog/lxdialog \

   .menuconfig.log \

   include/asm \

   .hdepend scripts/mkdep scripts/split-include scripts/docproc \

   $(TOPDIR)/include/linux/modversions.h \

   kernel.spec

# directories removed with 'make mrproper'

MRPROPER_DIRS = \

   include/config \

   $(TOPDIR)/include/linux/modules

```

```

   find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f

   rm -f $(MRPROPER_FILES)

   rm -rf $(MRPROPER_DIRS)

   $(MAKE) -C Documentation/DocBook mrproper

```

and cleans the arch dir, but think removing .depends file and the two dirs are the most important.

Cya lX

----------

## Zu`

Useful info,

thanks guys

----------

## mellofone

Can you simply say that you don't need mrproper if the kernel compiled?

----------

## lx

 *mellofone wrote:*   

> Can you simply say that you don't need mrproper if the kernel compiled?

 

If the kernel compiled and all seperate modules (alsa, nvidia, lmsensors, ...) compiled, and you don't get missing dependencies when installing these modules, well then you can say you didn't need mrproper. So just do it if you make changes, it can save you a recompile and it takes less then a second well don't forget to backup the /usr/src/linux/.config file)

Cya lX.

----------

## NicZak

Thank you all for the input, my question was definately answered.  Now how about checking my post under the hardware topic about usb gamepads!  I am out of ideas and seriously want to use my gamepad;p.  thx again!  - NicZak

----------

## brain

 *Quote:*   

> 
> 
> Not exactly, make mrproper, doesn't remove my patched files, it just removes a lot of files created by dependsalong with object files etc. So it just look like a clean kernel including all the patches you made, so all sourcecode remain untouched.
> 
> 

 

Good point and well said...

----------

