In a large pot, bring salted water to a boil. Add spaghetti or linguine and cook according to package instructions until al dente. Reserve ½ cup of pasta water, then drain the pasta and set aside.
In a large skillet over medium heat, add the olive oil. Once hot, add minced garlic and red pepper flakes. Sauté for about 1-2 minutes until the garlic is fragrant but not browned.
Pour in the crushed tomatoes and stir to combine. Cook for 5-7 minutes, allowing the sauce to simmer and thicken slightly.
Stir in the capers, black olives, sugar, salt, and pepper. Let this simmer for another 3-4 minutes, adjusting seasoning to taste.
Add the drained pasta to the skillet with the sauce, tossing gently until the pasta is evenly coated. If the sauce is too thick, gradually add reserved pasta water until the desired consistency is achieved.
Plate the pasta while hot, garnishing with chopped fresh parsley and, if desired, a sprinkle of grated Parmesan cheese.
Notes
Adjust the red pepper flakes according to your spice preference.