diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc
index 96f00f1..57283ea 100644
--- a/core/modules/update/update.fetch.inc
+++ b/core/modules/update/update.fetch.inc
@@ -193,7 +193,7 @@ function _update_process_fetch_task($project) {
 
   // Now that we processed the fetch task for this project, clear out the
   // record for this task so we're willing to fetch again.
-  drupal_container()->get('keyvalue')->get('update_fetch_task')->delete($project_name);
+  Drupal::keyValue('update_fetch_task')->delete($project_name);
 
   return $success;
 }
@@ -245,12 +245,12 @@ function _update_refresh() {
 function _update_create_fetch_task($project) {
   $fetch_tasks = &drupal_static(__FUNCTION__, array());
   if (empty($fetch_tasks)) {
-    $fetch_tasks = drupal_container()->get('keyvalue')->get('update_fetch_task')->getAll();
+    $fetch_tasks = Drupal::keyValue('update_fetch_task')->getAll();
   }
   if (empty($fetch_tasks[$project['name']])) {
     $queue = Drupal::queue('update_fetch_tasks');
     $queue->createItem($project);
-    drupal_container()->get('keyvalue')->get('update_fetch_task')->set($project['name'], $project);
+    Drupal::keyValue('update_fetch_task')->set($project['name'], $project);
     $fetch_tasks[$project['name']] = REQUEST_TIME;
   }
 }
