diff --git a/.gitattributes b/.gitattributes
index 2244894dcc56019add4c4be65ad674158dccf045..3e6943e574d902da76f56b877fd762e1a2de7d6c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,5 +6,4 @@ scripts/*  text eol=lf
 # Denote all files that are truly binary and should not be modified.
 *.png binary
 *.jpg binary
-*.build-config/
-*.pytest_cache/
\ No newline at end of file
+*.build-config/
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index c39d337cc92ee6ca53a0f7fa6e3749907ffa39a7..414a7ae1e38bfec508b63160b22d3a9f06e36b48 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
 *git-commit-ref*
 *_version.py*
 ubuntu-xenial-16.04-cloudimg-console.log
+**/.pytest_cache/
\ No newline at end of file
diff --git a/clmctest/scripts/.pytest_cache/v/cache/lastfailed b/clmctest/scripts/.pytest_cache/v/cache/lastfailed
deleted file mode 100644
index a120e0d9a98eab3d93b1e1878f1ea7a5aa9de13f..0000000000000000000000000000000000000000
--- a/clmctest/scripts/.pytest_cache/v/cache/lastfailed
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "test_config_telegraf.py::test_write_telegraf_conf": true
-}
\ No newline at end of file