diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php
index a41351ec966421961cc021476973719057111204..b7f50366bded0c9390b37be80551f47a43d335e9 100644
--- a/core/.phpstan-baseline.php
+++ b/core/.phpstan-baseline.php
@@ -12496,12 +12496,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/big_pipe/tests/src/Unit/StackMiddleware/ContentLengthTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function block_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/block/block.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function block_block_build_local_actions_block_alter\\(\\) has no return type specified\\.$#',
@@ -12994,12 +12988,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/block/tests/src/Unit/Plugin/migrate/process/BlockSettingsTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function block_content_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/block_content/block_content.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function block_content_help\\(\\) has no return type specified\\.$#',
@@ -14308,12 +14296,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/comment/comment.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function comment_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/comment/comment.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function comment_cron\\(\\) has no return type specified\\.$#',
@@ -16870,12 +16852,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/contact/tests/src/Unit/MailHandlerTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function content_moderation_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/content_moderation/content_moderation.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function content_moderation_action_info_alter\\(\\) has no return type specified\\.$#',
@@ -18076,12 +18052,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/content_translation/content_translation.admin.inc',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function content_translation_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/content_translation/content_translation.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _content_translation_install_field_storage_definitions\\(\\) has no return type specified\\.$#',
@@ -19054,12 +19024,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/dblog/dblog.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function dblog_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/dblog/dblog.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function dblog_cron\\(\\) has no return type specified\\.$#',
@@ -19246,12 +19210,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/dynamic_page_cache/tests/dynamic_page_cache_test/src/DynamicPageCacheTestController.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function editor_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/editor/editor.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _editor_delete_file_usage\\(\\) has no return type specified\\.$#',
@@ -19516,12 +19474,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function field_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/field/field.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function field_config_import_steps_alter\\(\\) has no return type specified\\.$#',
@@ -21394,12 +21346,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/file/file.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function file_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/file/file.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function file_cron\\(\\) has no return type specified\\.$#',
@@ -23014,12 +22960,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/help/help.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function help_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/help/help.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function help_block_view_help_block_alter\\(\\) has no return type specified\\.$#',
@@ -23212,12 +23152,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/history/history.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function history_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/history/history.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function history_cron\\(\\) has no return type specified\\.$#',
@@ -23398,12 +23332,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/image/image.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function image_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/image/image.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function image_entity_presave\\(\\) has no return type specified\\.$#',
@@ -24184,12 +24112,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/jsonapi/jsonapi.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function jsonapi_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/jsonapi/jsonapi.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function jsonapi_entity_bundle_create\\(\\) has no return type specified\\.$#',
@@ -25186,12 +25108,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/language/language.admin.inc',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function language_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/language/language.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function language_configuration_element_submit\\(\\) has no return type specified\\.$#',
@@ -26200,12 +26116,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/layout_builder/layout_builder.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function layout_builder_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/layout_builder/layout_builder.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function layout_builder_block_content_access\\(\\) has no return type specified\\.$#',
@@ -27994,12 +27904,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/locale/locale.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function locale_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/locale/locale.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _locale_parse_js_file\\(\\) has no return type specified\\.$#',
@@ -28936,12 +28840,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/media/media.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function media_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/media/media.install',
-];
 $ignoreErrors[] = [
 	// identifier: empty.variable
 	'message' => '#^Variable \\$error in empty\\(\\) always exists and is not falsy\\.$#',
@@ -29968,12 +29866,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/media/tests/src/Unit/ResourceTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function media_library_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/media_library/media_library.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _media_library_media_type_form_submit\\(\\) has no return type specified\\.$#',
@@ -30472,12 +30364,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function menu_link_content_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/menu_link_content/menu_link_content.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _menu_link_content_update_path_alias\\(\\) has no return type specified\\.$#',
@@ -31018,12 +30904,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/menu_ui/tests/src/Kernel/MenuBlockTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function migrate_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/migrate/migrate.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function migrate_help\\(\\) has no return type specified\\.$#',
@@ -32150,12 +32030,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/migrate/tests/src/Unit/process/SubstrTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function migrate_drupal_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/migrate_drupal/migrate_drupal.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function migrate_drupal_help\\(\\) has no return type specified\\.$#',
@@ -33558,12 +33432,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/node/node.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function node_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/node/node.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _node_access_rebuild_batch_finished\\(\\) has no return type specified\\.$#',
@@ -35844,12 +35712,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/page_cache/tests/src/Functional/PageCacheTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function path_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/path/path.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function path_entity_base_field_info\\(\\) has no return type specified\\.$#',
@@ -36264,12 +36126,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/pgsql/pgsql.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function pgsql_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/pgsql/pgsql.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function pgsql_help\\(\\) has no return type specified\\.$#',
@@ -36618,12 +36474,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/responsive_image/tests/src/Kernel/Plugin/migrate/source/d7/ResponsiveImageStylesTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function rest_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/rest/rest.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function rest_help\\(\\) has no return type specified\\.$#',
@@ -38016,12 +37866,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/search/tests/src/Kernel/SearchTokenizerTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function serialization_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/serialization/serialization.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function serialization_help\\(\\) has no return type specified\\.$#',
@@ -38910,12 +38754,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/syslog/src/Logger/SysLog.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function syslog_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/syslog/syslog.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function syslog_help\\(\\) has no return type specified\\.$#',
@@ -39744,12 +39582,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/system.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function system_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/system.install',
-];
 $ignoreErrors[] = [
 	// identifier: variable.undefined
 	'message' => '#^Variable \\$directories might not be defined\\.$#',
@@ -42656,12 +42488,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function equivalent_update_test_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Method Drupal\\\\error_service_test\\\\Controller\\\\LonelyMonkeyController\\:\\:testBrokenClass\\(\\) has no return type specified\\.$#',
@@ -44877,12 +44703,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function update_script_test_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/update_script_test/update_script_test.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function update_script_test_cache_flush\\(\\) has no return type specified\\.$#',
@@ -45015,12 +44835,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function update_test_last_removed_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function update_test_no_preexisting_update_8001\\(\\) has no return type specified\\.$#',
@@ -45111,12 +44925,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function update_test_with_7x_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\Batch\\\\ProcessingTest\\:\\:_resultMessages\\(\\) has no return type specified\\.$#',
@@ -47679,12 +47487,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/taxonomy/src/VocabularyListBuilder.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function taxonomy_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/taxonomy/taxonomy.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function taxonomy_build_node_index\\(\\) has no return type specified\\.$#',
@@ -48981,12 +48783,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/update/update.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function update_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/update/update.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function update_manager_batch_project_get\\(\\) has no return type specified\\.$#',
@@ -50721,12 +50517,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/user/user.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function user_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/user/user.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _user_cancel\\(\\) has no return type specified\\.$#',
@@ -59253,12 +59043,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/views/tests/src/Unit/WizardPluginBaseTest.php',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function views_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/views/views.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function _views_query_tag_alter_condition\\(\\) has no return type specified\\.$#',
@@ -62445,12 +62229,6 @@
 	'count' => 1,
 	'path' => __DIR__ . '/modules/workspaces/workspaces.install',
 ];
-$ignoreErrors[] = [
-	// identifier: missingType.return
-	'message' => '#^Function workspaces_update_last_removed\\(\\) has no return type specified\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/modules/workspaces/workspaces.install',
-];
 $ignoreErrors[] = [
 	// identifier: missingType.return
 	'message' => '#^Function workspaces_cron\\(\\) has no return type specified\\.$#',
diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php
index 1cca8e355268c09ff8d703ec7b2d35f66281740a..c11770d9bf55c86e05c979500f0427f1fafa0a3c 100644
--- a/core/lib/Drupal/Core/Extension/module.api.php
+++ b/core/lib/Drupal/Core/Extension/module.api.php
@@ -989,7 +989,7 @@ function hook_update_dependencies() {
  *
  * @see hook_update_N()
  */
-function hook_update_last_removed() {
+function hook_update_last_removed(): int {
   // We've removed the 8.x-1.x version of my_module, including database updates.
   // The next update function is my_module_update_8200().
   return 8103;
diff --git a/core/modules/block/block.install b/core/modules/block/block.install
index 0d2e66503fe4ef4b752cf837a0a154be98656e14..bba25269c0499b5fd1d69f1f8e05c4d25ce8f7bf 100644
--- a/core/modules/block/block.install
+++ b/core/modules/block/block.install
@@ -20,6 +20,6 @@ function block_install(): void {
 /**
  * Implements hook_update_last_removed().
  */
-function block_update_last_removed() {
+function block_update_last_removed(): int {
   return 8003;
 }
diff --git a/core/modules/block_content/block_content.install b/core/modules/block_content/block_content.install
index 8b2652a018dd45ea50ae5fc90808ea2810d18693..07b0bbbb5c39f5e006a65d8b031f4c1abeca8634 100644
--- a/core/modules/block_content/block_content.install
+++ b/core/modules/block_content/block_content.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function block_content_update_last_removed() {
+function block_content_update_last_removed(): int {
   return 10300;
 }
diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install
index 107b5a8f133ec6a3f27a56cbf0565f3b85cc6830..e86e629a34394e86062dcd9f243db5da25b24904 100644
--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -114,6 +114,6 @@ function comment_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function comment_update_last_removed() {
+function comment_update_last_removed(): int {
   return 10100;
 }
diff --git a/core/modules/content_moderation/content_moderation.install b/core/modules/content_moderation/content_moderation.install
index d3e817c5671397cb9b4b007f5bf1470c979ebc7e..546e580e41a31ea9c9a923a89843516e46b4e425 100644
--- a/core/modules/content_moderation/content_moderation.install
+++ b/core/modules/content_moderation/content_moderation.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function content_moderation_update_last_removed() {
+function content_moderation_update_last_removed(): int {
   return 8700;
 }
diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install
index 85571166885acb9927e8d723b7f587d759ac9677..a5a8b7dfdf8ef843d7ba09d8aab74f8f341505a0 100644
--- a/core/modules/content_translation/content_translation.install
+++ b/core/modules/content_translation/content_translation.install
@@ -41,6 +41,6 @@ function content_translation_install(): void {
 /**
  * Implements hook_update_last_removed().
  */
-function content_translation_update_last_removed() {
+function content_translation_update_last_removed(): int {
   return 8400;
 }
diff --git a/core/modules/dblog/dblog.install b/core/modules/dblog/dblog.install
index 7cabc6addfa55137068a71e57bb145b8b58aa840..796799c7b7f97f381c22fa80e0f5ab5eb756f96a 100644
--- a/core/modules/dblog/dblog.install
+++ b/core/modules/dblog/dblog.install
@@ -96,6 +96,6 @@ function dblog_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function dblog_update_last_removed() {
+function dblog_update_last_removed(): int {
   return 10101;
 }
diff --git a/core/modules/editor/editor.install b/core/modules/editor/editor.install
index 6e17486a8702551446712f5997600c95f575e2b6..ebc9167b24394a3cc735e127ef31b83270605cbf 100644
--- a/core/modules/editor/editor.install
+++ b/core/modules/editor/editor.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function editor_update_last_removed() {
+function editor_update_last_removed(): int {
   return 8001;
 }
diff --git a/core/modules/field/field.install b/core/modules/field/field.install
index 6b175e6afb33af3f50b6b09a65228bb45d48d06c..a4ca7b420edae24abe5c6031b8061fc3922e56c4 100644
--- a/core/modules/field/field.install
+++ b/core/modules/field/field.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function field_update_last_removed() {
+function field_update_last_removed(): int {
   return 8500;
 }
diff --git a/core/modules/file/file.install b/core/modules/file/file.install
index 7745a54041fcf9573fa658c566bd621412b34b35..cc816f6ec00cd946f4acb862a0ed73dcdcc83a92 100644
--- a/core/modules/file/file.install
+++ b/core/modules/file/file.install
@@ -108,6 +108,6 @@ function file_requirements($phase) {
 /**
  * Implements hook_update_last_removed().
  */
-function file_update_last_removed() {
+function file_update_last_removed(): int {
   return 8700;
 }
diff --git a/core/modules/help/help.install b/core/modules/help/help.install
index 6d646eb024a2a965c3d3ce9726036d1542b40c13..442aca8d277c070f7740cad45195c031abc4de2f 100644
--- a/core/modules/help/help.install
+++ b/core/modules/help/help.install
@@ -53,6 +53,6 @@ function help_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function help_update_last_removed() {
+function help_update_last_removed(): int {
   return 10200;
 }
diff --git a/core/modules/history/history.install b/core/modules/history/history.install
index 7222299842c0f6eb380d4f575bd65163c20dd3ce..80ff36378d36f502f4f6479ed9aa947f5a9c8396 100644
--- a/core/modules/history/history.install
+++ b/core/modules/history/history.install
@@ -45,6 +45,6 @@ function history_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function history_update_last_removed() {
+function history_update_last_removed(): int {
   return 10100;
 }
diff --git a/core/modules/image/image.install b/core/modules/image/image.install
index f4170dc6bc2e0820436bb8b4d097f85159cc2056..e23421795441defcadd7eb6fcf131496f532053e 100644
--- a/core/modules/image/image.install
+++ b/core/modules/image/image.install
@@ -73,6 +73,6 @@ function image_requirements($phase) {
 /**
  * Implements hook_update_last_removed().
  */
-function image_update_last_removed() {
+function image_update_last_removed(): int {
   return 8201;
 }
diff --git a/core/modules/jsonapi/jsonapi.install b/core/modules/jsonapi/jsonapi.install
index 3cc0ee0a8218605e3746a293dff7f431114165df..8db31414e1e4051c6e0444532b9caef726f5d052 100644
--- a/core/modules/jsonapi/jsonapi.install
+++ b/core/modules/jsonapi/jsonapi.install
@@ -79,6 +79,6 @@ function jsonapi_requirements($phase) {
 /**
  * Implements hook_update_last_removed().
  */
-function jsonapi_update_last_removed() {
+function jsonapi_update_last_removed(): int {
   return 9401;
 }
diff --git a/core/modules/language/language.install b/core/modules/language/language.install
index e3ab47e250998781745174e6a9f55b785b0b7fd7..b9d52e4f93be424f060c7c6427ce632ba31ddac6 100644
--- a/core/modules/language/language.install
+++ b/core/modules/language/language.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function language_update_last_removed() {
+function language_update_last_removed(): int {
   return 8001;
 }
diff --git a/core/modules/layout_builder/layout_builder.install b/core/modules/layout_builder/layout_builder.install
index 2629b72c096300184e90a699601f3ad0280d6763..587aa49153f9f50ccba4c2cd66075b8b95137edf 100644
--- a/core/modules/layout_builder/layout_builder.install
+++ b/core/modules/layout_builder/layout_builder.install
@@ -79,6 +79,6 @@ function layout_builder_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function layout_builder_update_last_removed() {
+function layout_builder_update_last_removed(): int {
   return 8602;
 }
diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install
index 97422682472c4f3281303536be7696e24b59694f..3ca2ce3db24fd87dfb6687c0b549b94edf5af8e1 100644
--- a/core/modules/locale/locale.install
+++ b/core/modules/locale/locale.install
@@ -319,7 +319,7 @@ function locale_requirements($phase) {
 /**
  * Implements hook_update_last_removed().
  */
-function locale_update_last_removed() {
+function locale_update_last_removed(): int {
   return 10100;
 }
 
diff --git a/core/modules/media/media.install b/core/modules/media/media.install
index b901db70ebea57723a568202b1196b89b6b38e82..0d4f40889302603df78c8a3832c57a8fd251fe2e 100644
--- a/core/modules/media/media.install
+++ b/core/modules/media/media.install
@@ -178,6 +178,6 @@ function media_requirements($phase) {
 /**
  * Implements hook_update_last_removed().
  */
-function media_update_last_removed() {
+function media_update_last_removed(): int {
   return 8700;
 }
diff --git a/core/modules/media_library/media_library.install b/core/modules/media_library/media_library.install
index 92dbf65385e375af9cddce7ea908a0db89d516c1..2aa41afe813cd854812d996f7ff628d903895942 100644
--- a/core/modules/media_library/media_library.install
+++ b/core/modules/media_library/media_library.install
@@ -22,6 +22,6 @@ function media_library_install($is_syncing): void {
 /**
  * Implements hook_update_last_removed().
  */
-function media_library_update_last_removed() {
+function media_library_update_last_removed(): int {
   return 8704;
 }
diff --git a/core/modules/menu_link_content/menu_link_content.install b/core/modules/menu_link_content/menu_link_content.install
index 6086ac08f59ab3cf8123eca357ac814e15415198..67630702efaa481a3c6a5f2540f441dec38766c1 100644
--- a/core/modules/menu_link_content/menu_link_content.install
+++ b/core/modules/menu_link_content/menu_link_content.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function menu_link_content_update_last_removed() {
+function menu_link_content_update_last_removed(): int {
   return 8601;
 }
diff --git a/core/modules/migrate/migrate.install b/core/modules/migrate/migrate.install
index 8df7dd47ea6fcdb5a26b3599352731d4caa9f0a7..81872f497c59f9b985e51ec4b35a3e330c0c0bb0 100644
--- a/core/modules/migrate/migrate.install
+++ b/core/modules/migrate/migrate.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function migrate_update_last_removed() {
+function migrate_update_last_removed(): int {
   return 10100;
 }
diff --git a/core/modules/migrate_drupal/migrate_drupal.install b/core/modules/migrate_drupal/migrate_drupal.install
index f5de03a7aca0306ef5468087bef7adc2965a2ed5..2a0a9c2d3942cb084b75d739bddfbbb3637e9f1b 100644
--- a/core/modules/migrate_drupal/migrate_drupal.install
+++ b/core/modules/migrate_drupal/migrate_drupal.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function migrate_drupal_update_last_removed() {
+function migrate_drupal_update_last_removed(): int {
   return 8901;
 }
diff --git a/core/modules/node/node.install b/core/modules/node/node.install
index 85a3794b69865b9383750d1e9bc317295fce7158..d4bc1c5b717ff2c55b2cec5dc8061f44ee0ecea5 100644
--- a/core/modules/node/node.install
+++ b/core/modules/node/node.install
@@ -157,6 +157,6 @@ function node_uninstall(): void {
 /**
  * Implements hook_update_last_removed().
  */
-function node_update_last_removed() {
+function node_update_last_removed(): int {
   return 8700;
 }
diff --git a/core/modules/path/path.install b/core/modules/path/path.install
index 78efdc997d06542fef129a3ced29eb9e0ba29463..6e4d9c370df935cb970464c5842a404d393d75b0 100644
--- a/core/modules/path/path.install
+++ b/core/modules/path/path.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function path_update_last_removed() {
+function path_update_last_removed(): int {
   return 8200;
 }
diff --git a/core/modules/pgsql/pgsql.install b/core/modules/pgsql/pgsql.install
index 1c505fbb35749e82f87fbda9308b6a6dde1d5e75..881e871bff73564052a178122bcac5e9d42ec71b 100644
--- a/core/modules/pgsql/pgsql.install
+++ b/core/modules/pgsql/pgsql.install
@@ -44,6 +44,6 @@ function pgsql_requirements() {
 /**
  * Implements hook_update_last_removed().
  */
-function pgsql_update_last_removed() {
+function pgsql_update_last_removed(): int {
   return 10101;
 }
diff --git a/core/modules/rest/rest.install b/core/modules/rest/rest.install
index 776f4591098c701f351cafaa8bdb1136b7424801..6a80d19f0f962eb6e90bcd2b82699251d87198b0 100644
--- a/core/modules/rest/rest.install
+++ b/core/modules/rest/rest.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function rest_update_last_removed() {
+function rest_update_last_removed(): int {
   return 8401;
 }
diff --git a/core/modules/serialization/serialization.install b/core/modules/serialization/serialization.install
index 0529e296f1a6641e1cd76bd2d49a97a9a88c4c27..3114e7a3e615bb09d068231a0336345265259bb0 100644
--- a/core/modules/serialization/serialization.install
+++ b/core/modules/serialization/serialization.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function serialization_update_last_removed() {
+function serialization_update_last_removed(): int {
   return 8401;
 }
diff --git a/core/modules/syslog/syslog.install b/core/modules/syslog/syslog.install
index 6661887324e6cf848fa7f2053182c6da70d486dc..b204bf432db7d36099308f93ba3830ba92304849 100644
--- a/core/modules/syslog/syslog.install
+++ b/core/modules/syslog/syslog.install
@@ -17,6 +17,6 @@ function syslog_install(): void {
 /**
  * Implements hook_update_last_removed().
  */
-function syslog_update_last_removed() {
+function syslog_update_last_removed(): int {
   return 8400;
 }
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index b903e574b5a705019c49e59ffabba950aad12452..5b921ee4696a4d1c6602b34a68976919d5719c1a 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -1661,7 +1661,7 @@ function system_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function system_update_last_removed() {
+function system_update_last_removed(): int {
   return 10201;
 }
 
diff --git a/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install b/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install
index 3a11103aa1f015946531aaa212a0d7fe144a4366..e264734728af87e22db05e2f4f97421ccf4fa606 100644
--- a/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install
+++ b/core/modules/system/tests/modules/equivalent_update_test/equivalent_update_test.install
@@ -14,7 +14,7 @@
   /**
    * Implements hook_update_last_removed().
    */
-  function equivalent_update_test_update_last_removed() {
+  function equivalent_update_test_update_last_removed(): int {
     return \Drupal::state()->get('equivalent_update_test_update_last_removed', 100000);
   }
 
diff --git a/core/modules/system/tests/modules/update_script_test/update_script_test.install b/core/modules/system/tests/modules/update_script_test/update_script_test.install
index 6780fecd99f35a98ac63a7444808c54a2bb1bc9d..617444b82dd58ad2d269d53c934cd6262a538613 100644
--- a/core/modules/system/tests/modules/update_script_test/update_script_test.install
+++ b/core/modules/system/tests/modules/update_script_test/update_script_test.install
@@ -52,7 +52,7 @@ function update_script_test_requirements_alter(array &$requirements): void {
 /**
  * Implements hook_update_last_removed().
  */
-function update_script_test_update_last_removed() {
+function update_script_test_update_last_removed(): int {
   return 7110;
 }
 
diff --git a/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install b/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install
index 9fc56d1be8cb5eb5974ff4272eb449541b19996f..e97f0d0e86131bd1e4c35d995a294515c8340a52 100644
--- a/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install
+++ b/core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install
@@ -10,7 +10,7 @@
 /**
  * Implements hook_update_last_removed().
  */
-function update_test_last_removed_update_last_removed() {
+function update_test_last_removed_update_last_removed(): int {
   return 8002;
 }
 
diff --git a/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install b/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install
index 74f4f9c6c034f381ed2a1597338f2a4db040d147..6a53f0febae0a613c191614c18703af8896a7968 100644
--- a/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install
+++ b/core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install
@@ -22,6 +22,6 @@ function update_test_with_7x_update_7201() {
 /**
  * Implements hook_update_last_removed().
  */
-function update_test_with_7x_update_last_removed() {
+function update_test_with_7x_update_last_removed(): int {
   return 7110;
 }
diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install
index 04fa3fe2be5c3581620e2bad5f876cdeca7963b8..0df8b4dc68ecb3f79b20178d0645bc1f81d880d7 100644
--- a/core/modules/taxonomy/taxonomy.install
+++ b/core/modules/taxonomy/taxonomy.install
@@ -8,6 +8,6 @@
 /**
  * Implements hook_update_last_removed().
  */
-function taxonomy_update_last_removed() {
+function taxonomy_update_last_removed(): int {
   return 10100;
 }
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index 3fb6136ab7086b415ca7dc7b40a482f5475bc318..ad1f9bc20ee04d593345ed9a5eb9dcf5db7966ee 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -172,6 +172,6 @@ function _update_requirement_check($project, $type) {
 /**
  * Implements hook_update_last_removed().
  */
-function update_update_last_removed() {
+function update_update_last_removed(): int {
   return 8001;
 }
diff --git a/core/modules/user/user.install b/core/modules/user/user.install
index 0475c47d3758389b4dd6e75e50e8570bdefb42a9..0d4211433c00f99595c9ed511f0fd1c6a3118c4a 100644
--- a/core/modules/user/user.install
+++ b/core/modules/user/user.install
@@ -122,6 +122,6 @@ function user_requirements($phase): array {
 /**
  * Implements hook_update_last_removed().
  */
-function user_update_last_removed() {
+function user_update_last_removed(): int {
   return 10000;
 }
diff --git a/core/modules/views/views.install b/core/modules/views/views.install
index cef5efae59f0b3d9811bb17b2d691d241a394e11..2f61cda6032354dd23fc25782610c7a68b2a977c 100644
--- a/core/modules/views/views.install
+++ b/core/modules/views/views.install
@@ -15,6 +15,6 @@ function views_install(): void {
 /**
  * Implements hook_update_last_removed().
  */
-function views_update_last_removed() {
+function views_update_last_removed(): int {
   return 8500;
 }
diff --git a/core/modules/workspaces/workspaces.install b/core/modules/workspaces/workspaces.install
index 96f45aad5ba631f0922cc33261e820bd56705a3c..d89b446a55b4c38591e9b06c545d5eeed6bd7e2c 100644
--- a/core/modules/workspaces/workspaces.install
+++ b/core/modules/workspaces/workspaces.install
@@ -123,6 +123,6 @@ function workspaces_schema() {
 /**
  * Implements hook_update_last_removed().
  */
-function workspaces_update_last_removed() {
+function workspaces_update_last_removed(): int {
   return 8803;
 }