django-soft-delete
Soft delete models, managers, queryset for Django
Decision gist · record as of 2026-08-14
Yes. Django Soft Delete is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a common Django pattern with minimal friction. Install it if your application needs recoverable deletion, audit trails, or soft-delete cascading. Skip it only if you have no use for logical deletion or prefer to implement the pattern yourself.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires django to be installed and a configured Django project with migrations support.
- Low install friction—a pure Python wheel with only django as a runtime dependency.
- Actively maintained with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making this safe to adopt in most projects.
last release 2026-02-21 (174 days) · last repo commit 2026-02-21 · 107 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 134,999 downloads/mo, #11,456 on PyPI
Alternatives
Verify before relying
pip install django-soft-delete
from django.db import models
class Article(SoftDeleteModel):
title = models.CharField(max_length=100)
# Then run: python manage.py makemigrations && python manage.py migrate
# Article.objects.create(title='Test')
# Article.objects.all() # sees only alive objects
# Article.deleted_objects.all() # sees only deleted objects- Whether soft-delete cascading works correctly when parent and child models use different on_delete strategies.
- Performance impact when querying large tables with many soft-deleted records.
- Compatibility with Django admin's default delete action and whether it respects soft deletion.
What it is and what it does
Django Soft Delete provides an abstract base model and manager classes that implement logical deletion—marking records as deleted without removing them from the database. When you inherit from the abstract model, your model automatically gains `is_deleted` and `deleted_at` fields, plus three managers: `objects` (shows only alive records), `deleted_objects` (shows only deleted records), and `global_objects` (shows all records). Calling `.delete()` on a soft-deleted model marks it as deleted; calling `.hard_delete()` removes it permanently. The package handles cascading soft deletes when related models also inherit from the same abstract model.
This is useful for audit trails, recovery workflows, and applications where data should be recoverable after deletion. It integrates with django's standard ORM and migration system, requiring only that you add the package to `INSTALLED_APPS` and run migrations. The library does not interfere with standard django relationships, though hard deletion of parent records will hard-delete children unless they are also soft-delete models.
Use it for
- Implement audit trails where deleted records remain queryable for compliance or recovery purposes.
- Build admin interfaces that allow users to restore accidentally deleted content without database recovery.
- Maintain referential integrity in related models by soft-deleting parents and children together while preserving the data.
- Filter out inactive or archived records from default queries while keeping them available for reporting or historical analysis.
- Support multi-tenant applications where soft deletion prevents accidental data loss across shared infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Django Soft Delete is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a common Django pattern with minimal friction. Install it if your application needs recoverable deletion, audit trails, or soft-delete cascading. Skip it only if you have no use for logical deletion or prefer to implement the pattern yourself.
Install
django-soft-delete on PyPI
Before you install
Low install friction—a pure Python wheel with only django as a runtime dependency. Actively maintained with recent commits and no known vulnerabilities.
Requires django to be installed and a configured Django project with migrations support.
License in practice
MIT license permits commercial and private use with minimal restrictions, making this safe to adopt in most projects.
Quickstart
pip install django-soft-delete
from django.db import models
class Article(SoftDeleteModel):
title = models.CharField(max_length=100)
# Then run: python manage.py makemigrations && python manage.py migrate
# Article.objects.create(title='Test')
# Article.objects.all() # sees only alive objects
# Article.deleted_objects.all() # sees only deleted objects
Verify before relying
- Whether soft-delete cascading works correctly when parent and child models use different on_delete strategies.
- Performance impact when querying large tables with many soft-deleted records.
- Compatibility with Django admin's default delete action and whether it respects soft deletion.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedjango |
| Maintenance | Actively maintained 174 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 134,999 / month, #11,456 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python Modules |
Evidence: django_soft_delete-1.0.23-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django soft delete”
- django-soft-deleteAdds soft deletion to Django models by marking records as deleted…
- django-safedeleteProvides soft-delete functionality for Django models, allowing…
- django-model-utilsProvides reusable model mixins and field utilities for Django…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also django-safedelete · sqlalchemy-easy-softdelete · django-ordered-model · django-add-default-value · django-deprecate-fields · django-model-utils · django-cleanup · django-reverse-admin · django-cacheops · django-pg-returning