---
updatedAt: 2026-04-16T23:25:29.000Z
agentTools:
  projectIndex: https://snipe-it.readme.io/llms.txt
---

# Regenerate Asset Tags

Though this is likely not something that would be necessary in most cases, Snipe-IT provides a command-line tool that allows you to regenerate all of your asset tags.

> ❗️ Important
>
> This action is data destructive. It will permanently overwrite all of your asset tags and cannot be undone.

From the Snipe-IT project root, via command line, run:

```
# Regenerate asset tags
$ php artisan snipeit:regenerate-tags
```

### Optional flags

<br />

```
# Regenerate asset tags, overriding the next auto-increment in Admin Settings > Asset Tags with the number specified in --start=
$ php artisan snipeit:regenerate-tags --start=1
```

<br />

```
# Regenerate asset tags with a summary output
$ php artisan snipeit:regenerate-tags --output=info
```

<br />

| Option       | Note                                                                            | Type                                           |
| :----------- | :------------------------------------------------------------------------------ | :--------------------------------------------- |
| `--start=`   | Override the next auto-increment in Admin > Asset Tags with this numeric value. | Numeric value                                  |
| ` --output=` | Display output.                                                                 | Options are `info`, `warn`, `error`, or `all`. |

After the asset tags are regenerated, you'll want to update your Admin > Asset Tags next auto increment setting.

### Resetting Zerofill

If you ONLY need to reset the zero fill on your asset tags, (for example to transition from `00035` to `000000035`) but need the asset tags otherwise unchanged, you can run the following, AFTER completing a backup of your database:

```mysql
UPDATE assets SET `asset_tag`=LPAD(`asset_tag`, 9, '0');
```

where `9` is the width of the new zero filled number.

To preview what would change without actually updating the asset\_tags, you can run:

```mysql
SELECT asset_tag,LPAD(`asset_tag`, 9, '0') from assets WHERE asset_tag != LPAD(`asset_tag`, 9, '0');
```

If you wanted to renumber all of your asset tags based off of the ID, for example, you want all of your asset tags to be 9 digits, zero-filled, but it should use the ID of the asset row in the database as the basis, you could do something like this:

```text
UPDATE assets SET asset_tag = LPAD(`id`,9,'0');
```

<br />