diff --git a/apps/files/controller/apicontroller.php b/apps/files/controller/apicontroller.php
index 072265d86d62c77ccc9083028964e26d30e2f7d4..8fc22a8aa666a8a62802be99be76e41d1252b07d 100644
--- a/apps/files/controller/apicontroller.php
+++ b/apps/files/controller/apicontroller.php
@@ -31,7 +31,6 @@ use OCP\AppFramework\Controller;
 use OCP\IRequest;
 use OCP\AppFramework\Http\DataResponse;
 use OCP\AppFramework\Http\DataDisplayResponse;
-use OCP\AppFramework\Http\DownloadResponse;
 use OCA\Files\Service\TagService;
 use OCP\IPreview;
 
diff --git a/apps/files/index.php b/apps/files/index.php
index ea0fd0ce2fec9944f10ade4e33a3cb56f9ecfc7a..c7a45e54854b9b1765def3a7f9878ac9ef8eb676 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -29,7 +29,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>
  *
  */
-use OCA\Files\Appinfo\Application;
 
 // Check if we are a user
 OCP\User::checkLoggedIn();
diff --git a/apps/files/tests/controller/apicontrollertest.php b/apps/files/tests/controller/apicontrollertest.php
index bbab711310c387adccd37f64edf2e3e0db41a984..0ec38e0e2e7331c5bf35469d229281f295cda586 100644
--- a/apps/files/tests/controller/apicontrollertest.php
+++ b/apps/files/tests/controller/apicontrollertest.php
@@ -25,7 +25,6 @@ namespace OCA\Files\Controller;
 
 use OC\Files\FileInfo;
 use OCP\AppFramework\Http;
-use OC\Preview;
 use OCP\Files\NotFoundException;
 use OCP\Files\StorageNotAvailableException;
 use Test\TestCase;
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 4a2eebf20b1552cbdcb58cc0deb2f72c697bdaed..7ebeb1565b49823e29a53f91510b077b2327f7f3 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -33,7 +33,6 @@ use Icewind\SMB\Exception\Exception;
 use Icewind\SMB\Exception\NotFoundException;
 use Icewind\SMB\NativeServer;
 use Icewind\SMB\Server;
-use Icewind\Streams\CallbackWrapper;
 use Icewind\Streams\IteratorDirectory;
 use OC\Files\Filesystem;
 
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php
index 182342c22e50193d021e2222f9835e2198ad06d4..da6667e2c8bfcc6570c4147c19a67493f8f4707d 100644
--- a/apps/files_sharing/lib/controllers/sharecontroller.php
+++ b/apps/files_sharing/lib/controllers/sharecontroller.php
@@ -46,7 +46,6 @@ use OCA\Files_Sharing\Helper;
 use OCP\User;
 use OCP\Util;
 use OCA\Files_Sharing\Activity;
-use OCP\AppFramework\Http\DataResponse;
 
 /**
  * Class ShareController
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 7c1dc5aeaf5aa8b8a02ae4d4c8eb65f234f8c186..39e182feb60d836e21bbaa2d6b8416c2bc00fa2f 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -25,7 +25,6 @@
 
 namespace OCA\Files_Sharing\External;
 
-use OC\Files\Filesystem;
 use OC\Files\Storage\DAV;
 use OC\ForbiddenException;
 use OCA\Files_Sharing\ISharedStorage;
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 10a37c7dae941bed80bf1ab686d6d821463ff876..9811ee2f70cc07b7adbcbfa87980992e8295ee9f 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -29,11 +29,8 @@
 
 namespace OC\Files\Storage;
 
-use OC\Files\Cache\ChangePropagator;
 use OC\Files\Filesystem;
 use OCA\Files_Sharing\ISharedStorage;
-use OCA\Files_Sharing\Propagator;
-use OCA\Files_Sharing\SharedMount;
 
 /**
  * Convert target path to source path and pass the function call to the correct storage provider
diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php
index 64ee5b8ce511560211b2e6840a39c593918b9d6a..d0c111b8e5bb933291b959cc676d562391390921 100644
--- a/apps/files_sharing/tests/controller/sharecontroller.php
+++ b/apps/files_sharing/tests/controller/sharecontroller.php
@@ -29,7 +29,6 @@ use OC\Files\Filesystem;
 use OCA\Files_Sharing\AppInfo\Application;
 use OCP\AppFramework\Http\NotFoundResponse;
 use OCP\AppFramework\IAppContainer;
-use OCP\Files;
 use OCP\AppFramework\Http\RedirectResponse;
 use OCP\AppFramework\Http\TemplateResponse;
 use OCP\Security\ISecureRandom;
diff --git a/apps/files_trashbin/tests/storage.php b/apps/files_trashbin/tests/storage.php
index 7415aba09e964ad1c5f1f4d2e75ae1d2594f76d1..d8ddf74e24a5dc6a667745198740f28ff05050a5 100644
--- a/apps/files_trashbin/tests/storage.php
+++ b/apps/files_trashbin/tests/storage.php
@@ -23,9 +23,7 @@
 
 namespace OCA\Files_trashbin\Tests\Storage;
 
-use OC\Files\Storage\Home;
 use OC\Files\Storage\Temporary;
-use OC\Files\Mount\MountPoint;
 use OC\Files\Filesystem;
 
 class Storage extends \Test\TestCase {
diff --git a/apps/files_versions/command/expire.php b/apps/files_versions/command/expire.php
index d652374652567c4be976346ba0e3397cb7b1847c..6cec9f4fac39adfb0c14d57a4679ffcf392deefb 100644
--- a/apps/files_versions/command/expire.php
+++ b/apps/files_versions/command/expire.php
@@ -11,7 +11,6 @@ namespace OCA\Files_Versions\Command;
 use OC\Command\FileAccess;
 use OCA\Files_Versions\Storage;
 use OCP\Command\ICommand;
-use OCP\IUser;
 
 class Expire implements ICommand {
 	use FileAccess;
diff --git a/apps/user_ldap/command/setconfig.php b/apps/user_ldap/command/setconfig.php
index 31fb4ac9127d4f264e3abd6ebb697014a9be5d48..53de5317207d894b871882e594f5b658c2b2d864 100644
--- a/apps/user_ldap/command/setconfig.php
+++ b/apps/user_ldap/command/setconfig.php
@@ -26,7 +26,6 @@ namespace OCA\user_ldap\Command;
 use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 use \OCA\user_ldap\lib\Helper;
 use \OCA\user_ldap\lib\Configuration;
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index f8ded69e86572fa090cb3017c11ae8391c826340..e6c0f5caa358de44d25d821fb70a25d6f374d300 100644
--- a/core/command/db/converttype.php
+++ b/core/command/db/converttype.php
@@ -30,7 +30,6 @@ namespace OC\Core\Command\Db;
 use \OCP\IConfig;
 use OC\DB\Connection;
 use OC\DB\ConnectionFactory;
-
 use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
diff --git a/lib/private/app/codecheckvisitor.php b/lib/private/app/codecheckvisitor.php
index 03b238096e7f73abc9a678f3b7c6dc81f4ebda27..e983bd8630b1a25be1fd2aacddb2c005409e23d2 100644
--- a/lib/private/app/codecheckvisitor.php
+++ b/lib/private/app/codecheckvisitor.php
@@ -22,18 +22,9 @@
 
 namespace OC\App;
 
-use OC\Hooks\BasicEmitter;
-use PhpParser\Lexer;
 use PhpParser\Node;
 use PhpParser\Node\Name;
-use PhpParser\NodeTraverser;
 use PhpParser\NodeVisitorAbstract;
-use PhpParser\Parser;
-use RecursiveCallbackFilterIterator;
-use RecursiveDirectoryIterator;
-use RecursiveIteratorIterator;
-use RegexIterator;
-use SplFileInfo;
 
 class CodeCheckVisitor extends NodeVisitorAbstract {
 
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 5072a65c02fed6ee3c4341a910917c94a71e51f4..8501fc69ad43c8566ce268943e733625e5eda7ef 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -42,7 +42,6 @@ use OC\AppFramework\Utility\SimpleContainer;
 use OC\AppFramework\Utility\TimeFactory;
 use OC\AppFramework\Utility\ControllerMethodReflector;
 use OCP\AppFramework\IApi;
-use OCP\AppFramework\QueryException;
 use OCP\AppFramework\IAppContainer;
 use OCP\AppFramework\Middleware;
 use OCP\IServerContainer;
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index 999750fd785cfca555376a6247760c87d2af7120..8def14e8e9c1e7ca863aa3b0e7355ceef7ed3a1c 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -27,9 +27,7 @@ namespace OC\Connector\Sabre;
 
 use OC\Connector\Sabre\Exception\InvalidPath;
 use OC\Files\FileInfo;
-use OC\Files\Filesystem;
 use OC\Files\Mount\MoveableMount;
-use OC_Connector_Sabre_Exception_InvalidPath;
 use OCP\Files\StorageInvalidException;
 use OCP\Files\StorageNotAvailableException;
 
diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php
index d0cac46e5932a9b383f5dd110852b2b3ad75e9ae..e47f98b0f27c9a6f34cb401f0ffa8084d74f2f2a 100644
--- a/lib/private/files/node/root.php
+++ b/lib/private/files/node/root.php
@@ -25,14 +25,11 @@
 
 namespace OC\Files\Node;
 
-use OC\Files\Cache\Cache;
 use OC\Files\Mount\Manager;
 use OC\Files\Mount\MountPoint;
 use OCP\Files\NotFoundException;
 use OCP\Files\NotPermittedException;
-use OC\Hooks\Emitter;
 use OC\Hooks\PublicEmitter;
-
 use OCP\Files\IRootFolder;
 
 /**
diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php
index 3c92665da3f78985e4d33657c9861f15b6fd8834..a741e5834a5fa93b98d36968e7b44e410304e875 100644
--- a/lib/private/files/objectstore/objectstorestorage.php
+++ b/lib/private/files/objectstore/objectstorestorage.php
@@ -24,7 +24,6 @@
 
 namespace OC\Files\ObjectStore;
 
-use OC\Files\Filesystem;
 use OCP\Files\ObjectStore\IObjectStore;
 
 class ObjectStoreStorage extends \OC\Files\Storage\Common {
diff --git a/lib/private/files/storage/localtempfiletrait.php b/lib/private/files/storage/localtempfiletrait.php
index 444e4e2e89e8b3927ebe09e0da8fb7340c7c9211..7dc9b777ea18967dcabd284a559b6392008b6b44 100644
--- a/lib/private/files/storage/localtempfiletrait.php
+++ b/lib/private/files/storage/localtempfiletrait.php
@@ -21,15 +21,6 @@
 
 namespace OC\Files\Storage;
 
-use OC\Files\Cache\Cache;
-use OC\Files\Cache\Scanner;
-use OC\Files\Filesystem;
-use OC\Files\Cache\Watcher;
-use OCP\Files\FileNameTooLongException;
-use OCP\Files\InvalidCharacterInPathException;
-use OCP\Files\InvalidPathException;
-use OCP\Files\ReservedWordException;
-
 /**
  * Storage backend class for providing common filesystem operation methods
  * which are not storage-backend specific.
diff --git a/lib/private/search/result/file.php b/lib/private/search/result/file.php
index 50b74e1ced2396ec6fb4131a8be03da9e0891922..4329f504a7d7807a56542b5174abfe8eab0b807b 100644
--- a/lib/private/search/result/file.php
+++ b/lib/private/search/result/file.php
@@ -23,7 +23,6 @@
  */
 
 namespace OC\Search\Result;
-use OC\Files\Filesystem;
 use OCP\Files\FileInfo;
 use OCP\Files\Folder;
 
diff --git a/tests/lib/files/node/integration.php b/tests/lib/files/node/integration.php
index 545793be54a083646e7acf4ac11d6e7b0e996670..2d5ccd1fb85315dfea28ed59c5797eceb3ee9b2d 100644
--- a/tests/lib/files/node/integration.php
+++ b/tests/lib/files/node/integration.php
@@ -8,7 +8,6 @@
 
 namespace Test\Files\Node;
 
-use OC\Files\Cache\Cache;
 use OC\Files\Node\Root;
 use OC\Files\Storage\Temporary;
 use OC\Files\View;
diff --git a/tests/lib/files/stream/encryption.php b/tests/lib/files/stream/encryption.php
index c2388c7682a5afe6439f1d0a886d6dd1355903e2..040be7256a613d4e779b8afc1e8832014ce65a03 100644
--- a/tests/lib/files/stream/encryption.php
+++ b/tests/lib/files/stream/encryption.php
@@ -3,7 +3,6 @@
 namespace Test\Files\Stream;
 
 use OC\Files\View;
-use OCA\Encryption_Dummy\DummyModule;
 
 class Encryption extends \Test\TestCase {