diff --git a/pkgs/by-name/sg/sgrep/package.nix b/pkgs/by-name/sg/sgrep/package.nix
deleted file mode 100644
index 4c93b1b6954e..000000000000
--- a/pkgs/by-name/sg/sgrep/package.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- stdenv,
- sgrep,
- fetchurl,
- runCommand,
- lib,
- m4,
- makeWrapper,
-}:
-
-stdenv.mkDerivation rec {
- pname = "sgrep";
- version = "1.94a";
-
- src = fetchurl {
- url = "https://www.cs.helsinki.fi/pub/Software/Local/Sgrep/sgrep-${version}.tar.gz";
- sha256 = "sha256-1bFkeOOrRHNeJCg9LYldLJyAE5yVIo3zvbKsRGOV+vk=";
- };
-
- nativeBuildInputs = [ makeWrapper ];
-
- postInstall = ''
- wrapProgram $out/bin/sgrep \
- --prefix PATH : ${lib.makeBinPath [ m4 ]}
- '';
-
- passthru.tests.smokeTest = runCommand "test-sgrep" { } ''
- expr='"" __ ""'
- data="12"
- ${sgrep}/bin/sgrep "$expr" <<<$data >$out
- read result <$out
- [[ $result = 1 ]]
- '';
-
- meta = with lib; {
- homepage = "https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html";
- description = "Grep for structured text formats such as XML";
- mainProgram = "sgrep";
- longDescription = ''
- sgrep (structured grep) is a tool for searching and indexing text,
- SGML, XML and HTML files and filtering text streams using
- structural criteria.
- '';
- platforms = platforms.unix;
- license = licenses.gpl2Plus;
- maintainers = with maintainers; [ eigengrau ];
- };
-}
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 34a31aee185b..8357d7f13432 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -1687,6 +1687,7 @@ mapAliases {
session-desktop-appimage = session-desktop;
sequoia = sequoia-sq; # Added 2023-06-26
sexp = sexpp; # Added 2023-07-03
+ sgrep = throw "'sgrep' has been removed as it was unmaintained upstream since 1998 and broken with gcc 14"; # Added 2025-05-17
shallot = throw "'shallot' has been removed as it is broken and the upstream repository was removed. Consider using 'mkp224o'"; # Added 2025-03-16
inherit (libsForQt5.mauiPackages) shelf; # added 2022-05-17
shell-hist = throw "'shell-hist' has been removed due to lack of upstream maintenance"; # Added 2025-01-25