diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 3bda94b..0988769 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -19,7 +19,6 @@
 import static android.animation.ValueAnimator.areAnimatorsEnabled;
 
 import static com.android.launcher3.anim.Interpolators.DEACCEL_1_5;
-import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
 import static com.android.launcher3.dragndrop.DraggableView.DRAGGABLE_ICON;
 import static com.android.launcher3.icons.IconNormalizer.ICON_VISIBLE_AREA_FACTOR;
 import static com.android.launcher3.util.MultiTranslateDelegate.INDEX_REORDER_BOUNCE_OFFSET;
@@ -557,9 +556,7 @@
     public void setSpringLoadedProgress(float progress) {
         if (Float.compare(progress, mSpringLoadedProgress) != 0) {
             mSpringLoadedProgress = progress;
-            if (!SHOW_HOME_GARDENING.get()) {
-                updateBgAlpha();
-            }
+            updateBgAlpha();
             setGridAlpha(progress);
         }
     }
@@ -584,9 +581,7 @@
     public void setScrollProgress(float progress) {
         if (Float.compare(Math.abs(progress), mScrollProgress) != 0) {
             mScrollProgress = Math.abs(progress);
-            if (!SHOW_HOME_GARDENING.get()) {
-                updateBgAlpha();
-            }
+            updateBgAlpha();
         }
     }
 
@@ -625,7 +620,7 @@
             }
         }
 
-        if (mVisualizeDropLocation && !SHOW_HOME_GARDENING.get()) {
+        if (mVisualizeDropLocation) {
             for (int i = 0; i < mDragOutlines.length; i++) {
                 final float alpha = mDragOutlineAlphas[i];
                 if (alpha <= 0) continue;
diff --git a/src/com/android/launcher3/DropTargetBar.java b/src/com/android/launcher3/DropTargetBar.java
index 5225731..98ecf3a 100644
--- a/src/com/android/launcher3/DropTargetBar.java
+++ b/src/com/android/launcher3/DropTargetBar.java
@@ -18,7 +18,6 @@
 
 import static com.android.launcher3.ButtonDropTarget.TOOLTIP_DEFAULT;
 import static com.android.launcher3.anim.AlphaUpdateListener.updateVisibility;
-import static com.android.launcher3.config.FeatureFlags.HOME_GARDENING_WORKSPACE_BUTTONS;
 
 import android.animation.TimeInterpolator;
 import android.content.Context;
@@ -119,13 +118,7 @@
             lp.rightMargin = (grid.widthPx - lp.width) / 2;
         }
         lp.height = grid.dropTargetBarSizePx;
-        // TODO: Add tablet support for DropTargetBar when HOME_GARDENING_WORKSPACE_BUTTONS flag
-        //  is on
-        if (HOME_GARDENING_WORKSPACE_BUTTONS.get()) {
-            lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
-        } else {
-            lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
-        }
+        lp.gravity = Gravity.CENTER_HORIZONTAL | Gravity.TOP;
 
         DeviceProfile dp = mLauncher.getDeviceProfile();
         int horizontalPadding = dp.dropTargetHorizontalPaddingPx;
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index fd78739..6e6f1ac 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -952,10 +952,6 @@
         return mScreenOrder;
     }
 
-    protected View getFirstPagePinnedItem() {
-        return mFirstPagePinnedItem;
-    }
-
     /**
      * Returns the screen ID of a page that is shown together with the given page screen ID when the
      * two panel UI is enabled.
diff --git a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
index 62e7ef3..55ab7f1 100644
--- a/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
+++ b/src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
@@ -29,14 +29,11 @@
 import static com.android.launcher3.LauncherState.HINT_STATE;
 import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
 import static com.android.launcher3.LauncherState.NORMAL;
-import static com.android.launcher3.LauncherState.SPRING_LOADED;
 import static com.android.launcher3.LauncherState.WORKSPACE_PAGE_INDICATOR;
 import static com.android.launcher3.anim.Interpolators.ACCEL_2;
 import static com.android.launcher3.anim.Interpolators.LINEAR;
 import static com.android.launcher3.anim.Interpolators.ZOOM_OUT;
 import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
-import static com.android.launcher3.config.FeatureFlags.HOME_GARDENING_WORKSPACE_BUTTONS;
-import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
 import static com.android.launcher3.graphics.Scrim.SCRIM_PROGRESS;
 import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
 import static com.android.launcher3.states.StateAnimationConfig.ANIM_HOTSEAT_FADE;
@@ -160,30 +157,6 @@
         float hotseatIconsAlpha = (elements & HOTSEAT_ICONS) != 0 ? 1 : 0;
         propertySetter.setViewAlpha(hotseat, hotseatIconsAlpha, hotseatFadeInterpolator);
 
-        if (SHOW_HOME_GARDENING.get()) {
-            propertySetter.setViewAlpha(
-                    mWorkspace.getFirstPagePinnedItem(),
-                    state == SPRING_LOADED ? FIRST_PAGE_PINNED_WIDGET_DISABLED_ALPHA : 1,
-                    workspaceFadeInterpolator);
-            propertySetter.addEndListener(success -> {
-                if (success) {
-                    mWorkspace.getFirstPagePinnedItem().setClickable(state != SPRING_LOADED);
-                }
-            });
-        }
-
-        if (HOME_GARDENING_WORKSPACE_BUTTONS.get()) {
-            propertySetter.setViewAlpha(
-                    mLauncher.getHotseat().getQsb(),
-                    state == SPRING_LOADED ? 0 : 1,
-                    workspaceFadeInterpolator);
-            propertySetter.addEndListener(success -> {
-                if (success) {
-                    mLauncher.getHotseat().getQsb().setClickable(state != SPRING_LOADED);
-                }
-            });
-        }
-
         // Update the accessibility flags for hotseat based on launcher state.
         hotseat.setImportantForAccessibility(
                 state.hasFlag(FLAG_HOTSEAT_INACCESSIBLE)
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 14cd964..991ab41 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -269,13 +269,6 @@
     public static final BooleanFlag ENABLE_SEARCH_UNINSTALLED_APPS = getReleaseFlag(270395269,
             "ENABLE_SEARCH_UNINSTALLED_APPS", DISABLED, "Search uninstalled app results.");
 
-    public static final BooleanFlag SHOW_HOME_GARDENING = getDebugFlag(270395183,
-            "SHOW_HOME_GARDENING", DISABLED, "Show the new home gardening mode");
-
-    public static final BooleanFlag HOME_GARDENING_WORKSPACE_BUTTONS = getDebugFlag(270395133,
-            "HOME_GARDENING_WORKSPACE_BUTTONS", DISABLED,
-            "Change workspace edit buttons to reflect home gardening");
-
     public static final BooleanFlag ENABLE_DOWNLOAD_APP_UX_V2 = getReleaseFlag(270395134,
             "ENABLE_DOWNLOAD_APP_UX_V2", ENABLED, "Updates the download app UX"
                     + " to have better visuals");
diff --git a/src/com/android/launcher3/states/SpringLoadedState.java b/src/com/android/launcher3/states/SpringLoadedState.java
index f5d511c..3286afb 100644
--- a/src/com/android/launcher3/states/SpringLoadedState.java
+++ b/src/com/android/launcher3/states/SpringLoadedState.java
@@ -15,7 +15,6 @@
  */
 package com.android.launcher3.states;
 
-import static com.android.launcher3.config.FeatureFlags.SHOW_HOME_GARDENING;
 import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_HOME;
 
 import android.content.Context;
@@ -45,11 +44,6 @@
 
     @Override
     public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) {
-
-        if (SHOW_HOME_GARDENING.get()) {
-            return super.getWorkspaceScaleAndTranslation(launcher);
-        }
-
         DeviceProfile grid = launcher.getDeviceProfile();
         Workspace<?> ws = launcher.getWorkspace();
         if (ws.getChildCount() == 0) {
@@ -68,9 +62,6 @@
 
     @Override
     protected float getDepthUnchecked(Context context) {
-        if (SHOW_HOME_GARDENING.get()) {
-            return 0;
-        }
         return 0.5f;
     }
 
@@ -81,10 +72,6 @@
 
     @Override
     public float getWorkspaceBackgroundAlpha(Launcher launcher) {
-        if (SHOW_HOME_GARDENING.get()) {
-            return 0;
-        }
-
         return 0.2f;
     }
 }
