# \[GULP] Gulp - Cleaning Unwanted Files

### Installing del Plugins

```
npm install del --save-dev
```

### Declare Dependencies and Create Tasks

```
var del = require('del');
```

```
gulp.task('clean:build', function() {
   return del.sync('build');
});
```

specific file or folder

```
gulp.task('clean:build', function() {
   //return del.sync('build');
   return del([
      'build/temp/',
      // instructs to clean temp folder
      '!build/package.json'
      // negate to instruct not to clean package.json file ]);
});
```
