PHPackages                             magenizr/magento2-deleteorders - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. magenizr/magento2-deleteorders

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

magenizr/magento2-deleteorders
==============================

This Magento 2 modules allows admin users to delete orders with all related information such as invoices, shipments and credit memos.

1.1.0(2y ago)39011OSL-3.0PHP

Since Sep 24Pushed 2y agoCompare

[ Source](https://github.com/magenizr/Magenizr_DeleteOrders)[ Packagist](https://packagist.org/packages/magenizr/magento2-deleteorders)[ Patreon](https://www.patreon.com/magenizr)[ RSS](/packages/magenizr-magento2-deleteorders/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

[![Magenizr Plus](https://camo.githubusercontent.com/41801bf1cd6d819f836c4ad512f40152ebe3d3f25412f7b2b8a07436e5076d7b/68747470733a2f2f696d61676573322e696d67626f782e636f6d2f31312f36622f79564f4f6c6f61415f6f2e676966)](https://account.magenizr.com)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

[![Latest Stable Version](https://camo.githubusercontent.com/94b5d366eeeb395170096102350794e605764e2960dcfa5dbf37ca6020999bf2/687474703a2f2f706f7365722e707567782e6f72672f6d6167656e697a722f6d6167656e746f322d64656c6574656f72646572732f76)](https://packagist.org/packages/magenizr/magento2-deleteorders) [![Total Downloads](https://camo.githubusercontent.com/28e6361a7c09e77f93169963a2c99f2d2e79d58eb699441cddfc786de22fcad8/687474703a2f2f706f7365722e707567782e6f72672f6d6167656e697a722f6d6167656e746f322d64656c6574656f72646572732f646f776e6c6f616473)](https://packagist.org/packages/magenizr/magento2-deleteorders) [![Latest Unstable Version](https://camo.githubusercontent.com/0a28ab1e84b528a6c0675338e089a4ace554975cc1e5b3588dd113c92e8e5cb2/687474703a2f2f706f7365722e707567782e6f72672f6d6167656e697a722f6d6167656e746f322d64656c6574656f72646572732f762f756e737461626c65)](https://packagist.org/packages/magenizr/magento2-deleteorders) [![License](https://camo.githubusercontent.com/c876fe5ca0c55a07e35ed211bb5ce9790e22f85d5bd2781ba24c1aeba3408856/687474703a2f2f706f7365722e707567782e6f72672f6d6167656e697a722f6d6167656e746f322d64656c6574656f72646572732f6c6963656e7365)](https://packagist.org/packages/magenizr/magento2-deleteorders) [![PHP Version Require](https://camo.githubusercontent.com/2d206fcbd4f56c8d56833eb9f8a27e18c1c2766f8ed609062317b8df889c909b/687474703a2f2f706f7365722e707567782e6f72672f6d6167656e697a722f6d6167656e746f322d64656c6574656f72646572732f726571756972652f706870)](https://packagist.org/packages/magenizr/magento2-deleteorders)

Delete Orders
=============

[](#delete-orders)

This Magento 2 modules allows admin users to delete orders including all related information such as invoices, shipments and credit memos via backend, command-line or REST API only.

[![Magenizr DeleteOrders - Backend](https://camo.githubusercontent.com/9200d7a9308bab3545c603472b5dd16944f094ae529aeca42fea7ebd1b628abc/68747470733a2f2f696d61676573322e696d67626f782e636f6d2f35392f34342f7972417a706c78545f6f2e6a706567)](https://camo.githubusercontent.com/9200d7a9308bab3545c603472b5dd16944f094ae529aeca42fea7ebd1b628abc/68747470733a2f2f696d61676573322e696d67626f782e636f6d2f35392f34342f7972417a706c78545f6f2e6a706567)[![Magenizr DeleteOrders - Backend](https://camo.githubusercontent.com/6ee0813fa83754a8a03837ca126e4138f0f31bd8f8ca3117ef7355f634abb55a/68747470733a2f2f696d61676573322e696d67626f782e636f6d2f34362f37392f4e664d6f356d6b795f6f2e6a706567)](https://camo.githubusercontent.com/6ee0813fa83754a8a03837ca126e4138f0f31bd8f8ca3117ef7355f634abb55a/68747470733a2f2f696d61676573322e696d67626f782e636f6d2f34362f37392f4e664d6f356d6b795f6f2e6a706567)

Business Value
--------------

[](#business-value)

A admin user can delete unwanted orders ( e.g test orders ) without having a developer / agency involved.

- A client support team, which usually has no access to the MySQL database can delete orders without having a developer involved.
- Practical for small businesses, which can not afford expensive agency support.

Features
--------

[](#features)

- A new option `Delete` to the `Actions` dropdown in the `Sales > Orders` grid.
- CLI command called `magenizr:order:delete`.
- REST API endpoint `/V1/order/:orderId`.
- A list `Restrict Order Status` in `Stores > Configuration > Magenizr > Delete Orders` allows the admin user to limit the delete feature to specific order statuses only.
- A drop down `Availability` that can be used to limit the availability to `Backend`, `Command-Line`, `REST API` or `All`.
- It clears all related order information which are stored in the following tables.

```
sales_invoice, sales_invoice_grid, sales_shipment, sales_shipment_grid, sales_creditmemo, sales_creditmemo_grid

```

- The functionality can be restricted to specific roles via `System > Permissions > User Roles`. The ACL resource is `Stores > Configuration > Delete Orders`.
- The configuration can be found in `Stores > Configuration > Magenizr > Delete Orders`.

Usage
-----

[](#usage)

1. Once the module is installed and enabled, a new option `Delete` in the dropdown `Actions` is available on `Sales > Orders`. Once the popup message `Are you sure you want to delete selected items?` is confirmed, the module will deleted selected items and display a success message `Total of X order(s) were deleted successfully.`.
2. On command-line `magenizr:order:delete` can be used to delete one or multiple ( comma separated ) order ids. For example:

```
bin/magento magenizr:order:delete 100000001
bin/magento magenizr:order:delete 100000001,100000002,100000003

```

```
bin/magento magenizr:order:delete 000000001,34234
Order ID 000000001 successfully deleted.
Order ID 34234 does not exist.

```

3. Via REST API simply git the endpoint `/V1/order/:orderId` and method `DELETE`.

System Requirements
-------------------

[](#system-requirements)

- Magento 2.4.x
- PHP 7.x, 8.x

Installation (Composer 2)
-------------------------

[](#installation-composer-2)

1. Update your composer.json `composer require "magenizr/magento2-deleteorders":"1.1.0" --no-update`
2. Use `composer update magenizr/magento2-deleteorders --no-install` to update your composer.lock file.

```
Updating dependencies
Lock file operations: 1 install, 1 update, 0 removals
  - Locking magenizr/magento2-deleteorders (1.1.0)

```

3. And then `composer install` to install the package.

```
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 0 update, 0 removals
  - Installing magenizr/magento2-deleteorders (1.1.0): Extracting archive

```

4. Enable the module and clear static content.

```
php bin/magento module:enable Magenizr_DeleteOrders --clear-static-content

```

Installation (Manually)
-----------------------

[](#installation-manually)

1. Download the latest version of the source code.
2. Extract the downloaded tar.gz file. Example: `tar -xzf Magenizr_DeleteOrders_1.1.0.tar.gz`.
3. Copy the code into `./app/code/Magenizr/DeleteOrders/`.
4. Enable the module and clear static content.

```
php bin/magento module:enable Magenizr_DeleteOrders --clear-static-content

```

Support
-------

[](#support)

If you experience any issues, don't hesitate to open an issue on [Github](https://github.com/magenizr/Magenizr_Debugger/issues).

Purchase
--------

[](#purchase)

This module is available for free on [GitHub](https://github.com/magenizr).

Contact
-------

[](#contact)

Follow us on [GitHub](https://github.com/magenizr), [Twitter](https://twitter.com/magenizr) and [Facebook](https://www.facebook.com/magenizr).

History
-------

[](#history)

===== 1.1.0 =====

- 2.4.6 compatibility tested
- REST API Support ``
- Code cleanup

===== 1.0.2 =====

- Test 2.4.5 compatibility
- Remove constraints in composer file
- Change wording

===== 1.0.1 =====

- Command name renamed from magenizr:deleteorders to magenizr:order:delete

===== 1.0.0 =====

- Stable version

License
-------

[](#license)

[OSL - Open Software Licence 3.0](http://opensource.org/licenses/osl-3.0.php)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~574 days

Total

4

Last Release

1063d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/605a729e99c0436f040a96767ee730868d660203396a8666a521fb77f5d93bd2?d=identicon)[magenizr](/maintainers/magenizr)

---

Top Contributors

[![magenizr](https://avatars.githubusercontent.com/u/36174840?v=4)](https://github.com/magenizr "magenizr (8 commits)")

---

Tags

deletemagento2magento2-extensionmagento2-extension-freemagento2-moduleorderstestdataordersdeletemagento 2sales

### Embed Badge

![Health badge](/badges/magenizr-magento2-deleteorders/health.svg)

```
[![Health](https://phpackages.com/badges/magenizr-magento2-deleteorders/health.svg)](https://phpackages.com/packages/magenizr-magento2-deleteorders)
```

###  Alternatives

[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2671.5M4](/packages/magepal-magento2-googletagmanager)[yireo/magento2-webp2

Magento 2 module to add WebP support to the Magento frontend

2091.2M7](/packages/yireo-magento2-webp2)[mageplaza/magento-2-blog-extension

Magento 2 Blog extension

123708.2k5](/packages/mageplaza-magento-2-blog-extension)[mageplaza/magento-2-seo-extension

Magento 2 SEO extension

138506.6k2](/packages/mageplaza-magento-2-seo-extension)[magepal/magento2-reindex

Reindex your Magento2 store quickly and easily from backend/admin, instead of command line.

112649.7k1](/packages/magepal-magento2-reindex)[tig/postnl-magento2

TIG Magento 2 PostNL extension

58544.2k4](/packages/tig-postnl-magento2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
