diff --git a/core/includes/update.inc b/core/includes/update.inc
index 521773703c..77685bd5bf 100644
--- a/core/includes/update.inc
+++ b/core/includes/update.inc
@@ -153,8 +153,14 @@ function _update_fix_missing_schema() {
  *   Name of the module.
  * @param string $schema_version
  *   The schema version the module should be set to.
+ *
+ * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct
+ *   replacement is provided.
+ *
+ * @see https://www.drupal.org/node/3210925
  */
 function update_set_schema($module, $schema_version) {
+  @trigger_error('update_set_schema() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3210925', E_USER_DEPRECATED);
   \Drupal::keyValue('system.schema')->set($module, $schema_version);
   \Drupal::service('extension.list.profile')->reset();
   \Drupal::service('extension.list.module')->reset();
diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
index 72e68014fe..79959dc630 100644
--- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
+++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php
@@ -78,13 +78,6 @@ public function testUpdateHooks() {
     $this->assertEqual(8001, drupal_get_installed_schema_version('update_test_schema', TRUE));
     // Ensure the index was added for column a.
     $this->assertTrue($connection->schema()->indexExists('update_test_schema_table', 'test'), 'Version 8001 of the update_test_schema module is installed.');
-
-    // Test the update_set_schema() utility function.
-    require_once $this->root . '/core/includes/update.inc';
-    update_set_schema('update_test_schema', 8003);
-    // Ensure schema has changed.
-    $this->assertEqual(8003, drupal_get_installed_schema_version('update_test_schema'));
-
   }
 
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php b/core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php
index 98f4035c6a..3e458ed7a6 100644
--- a/core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php
@@ -9,6 +9,8 @@
  *
  * @group legacy
  * @group extension
+ *
+ * @todo Remove in https://www.drupal.org/node/3210931
  */
 class UpdateDeprecationTest extends KernelTestBase {
 
@@ -31,4 +33,15 @@ public function testUpdateCheckIncompatibility() {
     $this->assertFalse(update_check_incompatibility('system'));
   }
 
+  /**
+   * Tests update_set_schema() function.
+   */
+  public function testUpdateSetSchema() {
+    $this->expectDeprecation('update_set_schema() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. No direct replacement is provided. See https://www.drupal.org/node/3210925');
+    require_once $this->root . '/core/includes/update.inc';
+    update_set_schema('update_test_schema', 8003);
+    // Ensure schema has changed.
+    $this->assertEqual(8003, \Drupal::keyValue('system.schema')->get('update_test_schema'));
+  }
+
 }
