> For the complete documentation index, see [llms.txt](https://ajuda.pdvlegal.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.pdvlegal.com.br/equipamentos/raspberry-no-pdv-legal/limpeza-do-banco-no-raspberry.md).

# Limpeza do banco no Raspberry

{% hint style="danger" %}

#### **Pré-requisitos**

* Estar na **mesma rede local** do Raspberry Pi.
* Conhecer o **endereço IP** do dispositivo (ex.: `192.168.15.115`).
* Usuário **root** e senha **123web** de acesso ao phpMyAdmin.
* Ter certeza de que **já existe um backup** recente do banco (veja [**Backup e coleta de logs no Raspberry**](/equipamentos/raspberry-no-pdv-legal/backup-e-coleta-de-logs-no-raspberry.md)).
  {% endhint %}

### Limpar o banco de dados do Raspberry <a href="#passoapasso" id="passoapasso"></a>

{% stepper %}
{% step %}

#### Acessar o phpMyAdmin <a href="#undefined" id="undefined"></a>

* Abra o navegador (PC, celular ou tablet).
* Digite no campo de endereço:

`http://<IP_DO_RASP>/phpmyadmin`

Ex.: `http://192.168.15.115/phpmyadmin`

* Informe **Login: root** e **Senha: 123web**.

Em acesso remoto por tablet/celular, digite a senha usando o teclado virtual.

<figure><img src="/files/oPMrBAdNJ0yXv8dRbWju" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Selecionar a base WALINUX <a href="#id-2selecionarabasewalinux" id="id-2selecionarabasewalinux"></a>

* No menu à esquerda, clique em **WALINUX** (último item da lista) para expandir as tabelas.

<figure><img src="/files/RrEprbe2MjD6FetjafEP" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Executar o script de limpeza <a href="#id-3executaroscriptdelimpeza" id="id-3executaroscriptdelimpeza"></a>

* Clique na aba **SQL** (barra superior).
* Será exibido um campo em branco.
* Copie e cole o script a seguir no editor SQL:

`DELETE FROM formapagto;`\
`DELETE FROM ultimas_vendas;`\
`DELETE FROM movimento;`\
`DELETE FROM produto;`\
`DELETE FROM venda;`\
`DELETE FROM venda_formapagto;`\
`DELETE FROM venda_impressao;`\
`DELETE FROM venda_lock;`\
`DELETE FROM venda_modificador;`\
`DELETE FROM venda_produto;`\
`DELETE FROM venda_tef;`

* Clique em **Executar**.

O phpMyAdmin exibirá a mensagem de sucesso para cada tabela.

<figure><img src="/files/XqjRoiF9rhQBZJLcU6Yc" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ajuda.pdvlegal.com.br/equipamentos/raspberry-no-pdv-legal/limpeza-do-banco-no-raspberry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
