diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
index 441e256..9b0195a 100644
--- a/src/sage/doctest/control.py
+++ b/src/sage/doctest/control.py
@@ -494,15 +494,6 @@ class DocTestController(SageObject):
                 # that the package is actually installed).
                 if 'optional' in options.optional:
                     options.optional.discard('optional')
-                    from sage.misc.package import list_packages
-                    for pkg in list_packages('optional', local=True).values():
-                        if pkg.name in options.hide:
-                            continue
-                        # Skip features for which we have a more specific runtime feature test.
-                        if pkg.name in ['bliss', 'coxeter3', 'mcqd', 'meataxe', 'sirocco', 'tdlib']:
-                            continue
-                        if pkg.is_installed() and pkg.installed_version == pkg.remote_version:
-                            options.optional.add(pkg.name)
 
                     from sage.features import package_systems
                     options.optional.update(system.name
diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py
index 3cf3d37..588e21b 100644
--- a/src/sage/misc/all.py
+++ b/src/sage/misc/all.py
@@ -128,8 +128,5 @@ lazy_import('sage.misc.banner', 'banner', deprecation=34259)
 lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259)
 lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259)
 lazy_import('sage.misc.trace', 'trace', deprecation=34259)
-lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed',
-                                  'package_versions'),
-            deprecation=34259)
 lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259)
 lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259)
diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
index 21a524a..e8090c8 100644
--- a/src/sage/tests/cmdline.py
+++ b/src/sage/tests/cmdline.py
@@ -13,9 +13,7 @@ test.spyx
 --advanced
 -c
 --cython
---dev
 --ecl
---experimental
 --fixdoctests
 --gap
 --gdb
@@ -28,7 +26,6 @@ test.spyx
 --maxima
 --min
 --mwrank
---optional
 --preparse
 --python
 --python3
@@ -40,7 +37,6 @@ test.spyx
 --sh
 --singular
 --sqlite3
---standard
 --startuptime
 -t
 -v
@@ -513,6 +509,7 @@ Some programs of which we check functionality using only ``--version``::
     0
 
     sage: # optional - r
+
     sage: (out, err, ret) = check_executable(["sage", "--R", "--version"])
     sage: out.find("R version ") >= 0
     True
@@ -529,35 +526,6 @@ Some programs of which we check functionality using only ``--version``::
     sage: ret
     0
 
-Check some things requiring an internet connection::
-
-    sage: # optional - internet
-    sage: (out, err, ret) = check_executable(["sage", "--standard"])
-    sage: out.find("cython") >= 0
-    True
-    sage: err
-    ''
-    sage: ret
-    0
-
-    sage: # optional - internet
-    sage: (out, err, ret) = check_executable(["sage", "--optional"])
-    sage: out.find("database_cremona_ellcurve") >= 0
-    True
-    sage: err
-    ''
-    sage: ret
-    0
-
-    sage: # optional - internet
-    sage: (out, err, ret) = check_executable(["sage", "--experimental"])
-    sage: out.find("valgrind") >= 0
-    True
-    sage: err
-    ''
-    sage: ret
-    0
-
 Check an illegal command line option.  This outputs an error to stdout,
 but we allow stderr in case this changes in the future::
 
