---
title: "Como excluir uma aplicação Django"
version: 6.1
locale: pt-br
source: https://docs.djangoproject.com/pt-br/6.1/howto/delete-app/
canonical: https://djangodocs.dev/pt-br/6.1/howto/delete-app/
---
# Como excluir uma aplicação Django

O Django fornece a habilidade de agrupar conjuntos de funcionalidades em pacotes Python chamados  [applications](/pt-br/6.1/ref/applications/). Quando os requisitos mudam seus apps podem se tornar obsoletos ou desnecessários. Os seguintes passos vão ajudar você a excluir uma aplicação de maneira segura.

1. Remove all references to the app (imports, foreign keys etc.).
2. Remove all models from the corresponding `models.py` file.
3. Create relevant migrations by running [`makemigrations`](/pt-br/6.1/ref/django-admin/#django-admin-makemigrations). This step
   generates a migration that deletes tables for the removed models, and any
   other required migration for updating relationships connected to those
   models.
4. [Squash](/pt-br/6.1/topics/migrations/#migration-squashing) out references to the app in other apps’
   migrations.
5. Apply migrations locally, run tests, and verify the correctness of your
   project.
6. Deploy/release your updated Django project.
7. Remove the app from [`INSTALLED_APPS`](/pt-br/6.1/ref/settings/#std-setting-INSTALLED_APPS).
8. Finally, remove the app’s directory.
