How to purge directory with puppet and keep the dot files -
is there way purge folder , keep dotfiles? i'd purge /root. something like: file { '/root': ensure => present, owner => 'root', group => 'root', mode => 0550, purge => true, recurse => true, } file { '/root/.*': ensure => present, owner => 'root', group => 'root', } either go ignore param h2ooooooo correctly stated. you may find cleaner not recurse , use tidy type , matches parameter instead. tidy { "/root": recurse => 1, matches => '[a-za-z0-9_]*' }