diff --git a/core/modules/aggregator/aggregator.admin.inc b/core/modules/aggregator/aggregator.admin.inc
index f26d4ff..0800960 100644
--- a/core/modules/aggregator/aggregator.admin.inc
+++ b/core/modules/aggregator/aggregator.admin.inc
@@ -73,8 +73,8 @@ function aggregator_form_category_validate($form, &$form_state) {
 function aggregator_form_category_submit($form, &$form_state) {
   // @todo Replicate this cache invalidation when these ops are separated.
   // Invalidate the block cache to update aggregator category-based derivatives.
-  if (module_exists('block')) {
-    drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+  if (Drupal::moduleHandler()->moduleExists('block')) {
+    Drupal::service('plugin.manager.block')->clearCachedDefinitions();
   }
   if ($form_state['values']['op'] == t('Delete')) {
     $title = $form_state['values']['title'];
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index 6bb3089..e7c44ca 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -345,7 +345,7 @@ function aggregator_save_category($edit) {
         ->condition('cid', $edit['cid'])
         ->execute();
       // Make sure there is no active block for this category.
-      if (module_exists('block')) {
+      if (Drupal::moduleHandler()->moduleExists('block')) {
         foreach (entity_load_multiple_by_properties('block', array('plugin' => 'aggregator_category_block:' . $edit['cid'])) as $block) {
           $block->delete();
         }
@@ -365,7 +365,7 @@ function aggregator_save_category($edit) {
       ->execute();
     $op = 'insert';
   }
-  if (isset($op) && module_exists('menu_link')) {
+  if (isset($op) && Drupal::moduleHandler()->moduleExists('menu_link')) {
     menu_link_maintain('aggregator', $op, $link_path, $edit['title']);
   }
 }
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
index 69c8e34..0d1503d 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/Core/Entity/Feed.php
@@ -191,7 +191,7 @@ public static function preCreate(EntityStorageControllerInterface $storage_contr
    */
   public static function preDelete(EntityStorageControllerInterface $storage_controller, array $entities) {
     // Invalidate the block cache to update aggregator feed-based derivatives.
-    if (module_exists('block')) {
+    if (\Drupal::moduleHandler()->moduleExists('block')) {
       \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
     }
     $storage_controller->deleteCategories($entities);
