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 221b921..83941f9 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -347,7 +347,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();
         }
@@ -367,7 +367,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/FeedStorageController.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php
index 82a5643..28650eb 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorageController.php
@@ -84,8 +84,8 @@ protected function preSave(EntityInterface $entity) {
     parent::preSave($entity);
 
     // Invalidate the block cache to update aggregator feed-based derivatives.
-    if (module_exists('block')) {
-      drupal_container()->get('plugin.manager.block')->clearCachedDefinitions();
+    if (Drupal::moduleHandler()->moduleExists('block')) {
+      \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
     }
     // An existing feed is being modified, delete the category listings.
     db_delete('aggregator_category_feed')
