code: func DeleteExpiredSnapshots(cmd *m.DeleteExpiredSnapshotsCommand) error {
  	return inTransaction(func(sess *DBSession) error {
  		if !setting.SnapShotRemoveExpired {
  			sqlog.Warn("[Deprecated] The snapshot_remove_expired setting is outdated. Please remove from your config.")
  			return nil
  		}
  
  		deleteExpiredSql := "DELETE FROM dashboard_snapshot WHERE expires < ?"
  		expiredResponse, err := sess.Exec(deleteExpiredSql, time.Now())
  		if err != nil {
  			return err
  		}
  		cmd.DeletedRows, _ = expiredResponse.RowsAffected()
  
  		return nil
  	})
  }
docs: // DeleteExpiredSnapshots removes snapshots with old expiry dates.
  // SnapShotRemoveExpired is deprecated and should be removed in the future.
  // Snapshot expiry is decided by the user when they share the snapshot.