diff --git a/src/adb.c b/src/adb.c
index ee992cfe73917e6f49564469f1bc55276ebf87df..2df34b4f6a636fa86a7ca070bd27c1445b2411be 100644
--- a/src/adb.c
+++ b/src/adb.c
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <malloc.h>
 #include <assert.h>
 #include <errno.h>
 #include <sys/mman.h>
diff --git a/src/blob.c b/src/blob.c
index d51596100b61522fe20e7b02af124f2fe8dcb2a4..8413a3beb50f3677b2dc8b188b52dd5dd73cce98 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -7,7 +7,7 @@
  * SPDX-License-Identifier: GPL-2.0-only
  */
 
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdint.h>
diff --git a/src/common.c b/src/common.c
index 580e6d58ce290aeae7d1bc63689d098c313e85bc..2b0fe7e7fcc750dddde5bda7d3c4d5d6b430b7ed 100644
--- a/src/common.c
+++ b/src/common.c
@@ -6,7 +6,6 @@
  * SPDX-License-Identifier: GPL-2.0-only
  */
 
-#include <malloc.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/src/database.c b/src/database.c
index 589a5052f6b3ce195d9903723804428cae0714c9..be7a0a1c311e7f3d55b19207c9f37535b3475a37 100644
--- a/src/database.c
+++ b/src/database.c
@@ -14,7 +14,6 @@
 #include <libgen.h>
 #include <limits.h>
 #include <unistd.h>
-#include <malloc.h>
 #include <string.h>
 #include <stdlib.h>
 #include <signal.h>
diff --git a/src/io.c b/src/io.c
index cf30bb6eed00316c0a3fa57dd01b15d173b98ae2..8a9646afa56ea8fbf974b0fa05099c47447e674a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -12,7 +12,6 @@
 #include <fcntl.h>
 #include <endian.h>
 #include <unistd.h>
-#include <malloc.h>
 #include <dirent.h>
 #include <stdint.h>
 #include <sys/mman.h>
diff --git a/src/io_gunzip.c b/src/io_gunzip.c
index e3ff178ee6f10fe6962dea93f6a05881465576e6..ce2959285ce63037d32b61c2ae9798d4006da5ec 100644
--- a/src/io_gunzip.c
+++ b/src/io_gunzip.c
@@ -10,7 +10,6 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <malloc.h>
 #include <zlib.h>
 
 #include "apk_defines.h"
diff --git a/src/package.c b/src/package.c
index 6003c5b87e812769bc603b59305dc6d817883ccc..0e6a23a44c47d00fba64e7062d6f282fd504b2dc 100644
--- a/src/package.c
+++ b/src/package.c
@@ -12,7 +12,6 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <limits.h>
-#include <malloc.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/src/print.c b/src/print.c
index 31a9fbb0362177afaa7b99ef630f3068217c4744..a177cd52af6775f89692ac19c716927a786b0a69 100644
--- a/src/print.c
+++ b/src/print.c
@@ -11,7 +11,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <malloc.h>
 #include <errno.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>