Index: /trunk/data/validator/deprecated.mapcss
===================================================================
--- /trunk/data/validator/deprecated.mapcss	(revision 7598)
+++ /trunk/data/validator/deprecated.mapcss	(revision 7599)
@@ -281,2 +281,8 @@
   fixAdd: "bridge:structure=suspension";
 }
+
+/* See #10582 - JOSM supported this tag as "don't upload this" feature, before the introduction of upload flag at layer level */
+*[/josm\/ignore/] {
+  throwError: tr("{0} is deprecated. Please delete this object and use a private layer instead", "{0.key}");
+  fixDeleteObject: this;
+}
Index: /trunk/src/org/openstreetmap/josm/data/APIDataSet.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 7598)
+++ /trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 7599)
@@ -29,9 +29,8 @@
 
 /**
- * Represents a collection of {@link OsmPrimitive}s which should be uploaded to the
- * API.
+ * Represents a collection of {@link OsmPrimitive}s which should be uploaded to the API.
  * The collection is derived from the modified primitives of an {@link DataSet} and it provides methods
  * for sorting the objects in upload order.
- *
+ * @since 2025
  */
 public class APIDataSet {
@@ -65,7 +64,4 @@
 
         for (OsmPrimitive osm :primitives) {
-            if (osm.get("josm/ignore") != null) {
-                continue;
-            }
             if (osm.isNewOrUndeleted() && !osm.isDeleted()) {
                 toAdd.add(osm);
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7598)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 7599)
@@ -28,4 +28,5 @@
 import org.openstreetmap.josm.command.ChangePropertyKeyCommand;
 import org.openstreetmap.josm.command.Command;
+import org.openstreetmap.josm.command.DeleteCommand;
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -37,4 +38,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.gui.mappaint.Environment;
+import org.openstreetmap.josm.gui.mappaint.Keyword;
 import org.openstreetmap.josm.gui.mappaint.MultiCascade;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition;
@@ -139,4 +141,5 @@
         protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<>();
         protected final Map<String, Boolean> assertions = new HashMap<>();
+        protected boolean deletion = false;
 
         TagCheck(GroupedMapCSSRule rule) {
@@ -210,4 +213,6 @@
                             : ai.val instanceof String
                             ? (String) ai.val
+                            : ai.val instanceof Keyword
+                            ? ((Keyword) ai.val).val
                             : null;
                     if (ai.key.startsWith("throw")) {
@@ -238,4 +243,7 @@
                         final String[] x = val.split("=>", 2);
                         check.keyChange.put(Tag.removeWhiteSpaces(x[0]), Tag.removeWhiteSpaces(x[1]));
+                    } else if ("fixDeleteObject".equals(ai.key) && val != null) {
+                        CheckParameterUtil.ensureThat(val.equals("this"), "fixDeleteObject must be followed by 'this'");
+                        check.deletion = true;
                     } else if ("suggestAlternative".equals(ai.key) && val != null) {
                         check.alternatives.add(val);
@@ -388,5 +396,5 @@
          */
         Command fixPrimitive(OsmPrimitive p) {
-            if (change.isEmpty() && keyChange.isEmpty()) {
+            if (change.isEmpty() && keyChange.isEmpty() && !deletion) {
                 return null;
             }
@@ -403,4 +411,7 @@
                 final String newKey = insertArguments(matchingSelector, i.getValue());
                 cmds.add(new ChangePropertyKeyCommand(p, oldKey, newKey));
+            }
+            if (deletion) {
+                cmds.add(new DeleteCommand(p));
             }
             return new SequenceCommand(tr("Fix of {0}", getDescriptionForMatchingSelector(p, matchingSelector)), cmds);
