web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / How delete a specific ...
Finance forum

How delete a specific model/package?

(0) ShareShare
ReportReport
Posted on by 160

Hello,

In visual Studio, you can Add/Update model/package.

But no option to delete.

I don't see an official method to do the job.

I guess delete specific directory package file or delete the directory specific model file (with deleting the xml file descriptor in package Descriptor directory ) could be the solution.

Any idea?

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    306,430 Super User 2026 Season 1 on at

    Hi Foxsor,

    At this moment deleting a package/model is not supported. To have it deleted, it would be the best to deploy a new environment and don't apply the packages which are not required.

  • Verified answer
    dekaasboer Profile Picture
    1,530 on at

    I concur with Andre, there is no right way to uninstall a hotfix package exept for restoring the backup you made before installing the update. Or starting with a fresh machine and re-applying your customisations.

  • Foxsor Profile Picture
    160 on at

    Thank's André and Rik for you reply

  • Suggested answer
    Basheer17 Profile Picture
    2,720 on at

    We have used ModelUtil.exe to delete models in dev environment.

    C:\AOSService\PackagesLocalDirectory\Bin>ModelUtil.exe

    Usage: ModelUtil.exe -delete -metadatastorepath=[path to metadata store] -modelname=[name of the model to delete]

  • Suggested answer
    Pyaarey Profile Picture
    47 on at

    I agree to 'Mohammad Basheeruddin's response. ModelUtil.exe can be used for the purpose of removing or deleting a model. It is command prompt utility. 

    Just adding little more details here about the usage.  At command prompt: 
    1. Browse to: C:\AOSService\PackagesLocalDirectory\bin folder.
    2. Type in ModelUtil.exe /? to get to know about parameters.
    3. I did import a custom model name was "Application suite VAR model" and I did remove it using following command:

    C:\AOSService\PackagesLocalDirectory\Bin>ModelUtil.exe -delete -metadatastorepath="C:\AOSService\PackagesLocalDirectory" -modelname="Application suite VAR model"   <press Enter>
    Are you sure you want to delete model Application suite VAR model? (Y/N)
    y

    C:\AOSService\PackagesLocalDirectory\Bin>

  • André Arnaud de Calavon Profile Picture
    306,430 Super User 2026 Season 1 on at

    There are two moments when you would like to remove a model. In development stage and on a live environment. My answer was based on a live environment. Then you cannot use this ModelUtil.exe as Microsoft is only installing deployable packages on the Azure machines.

    In the development environment you can delete models, but I wonder if it will really remove build features or only the development objects. Haven't tested this yet.

  • Pyaarey Profile Picture
    47 on at

    Yes. Agree with you. In Production environment, LCS team does the deployments so client/partner don't get access to PROD.

    I did use it on Development environment and it does delete the model and metadata information from the file system. However, if there are some DB changes (for example, addition of fields in the table or created a new table altogether) and DB synchronization is already complete, then DB changes do not go away with model delete. They persist. Now since extension model is deleted and files don't exist in the system, eventually there is no way the added fields can be deleted unless one has to do hard way (delete from table directly - not recommended).

  • Suggested answer
    Uzair Saleem Profile Picture
    135 on at

    For model deletion use modelutil.exe delete command and delete the folder after stopping service. then build and sync.

    For Package deletion on dev environment , just stop the AOS service, delete the package folder inside the PackagesLocalDirectory , then start service, build and sync.

  • FahadAhmed Profile Picture
    205 on at

    Hi Guys - 

    I deleted a custom package but didn't stop the service (not even even sure which service in D365 corresponds to AOS service) later when I try to run the application through VS (after building and syncing it) or access the URL, I get the following error. 

    Service Unavailable


    HTTP Error 503. The service is unavailable.

    I checked the service Microsoft Dynamics 365 for Operations - Batch Management Service was stopped (not sure how) so I started it. Still getting the same error. 


    Any suggestions? 

    -Fahad

  • Uzair Saleem Profile Picture
    135 on at

    Hi  Fahad,

    Building and synching done successfully without any error?

    have you check the application pool?

    what you found in event viewer?

    Please share some more detail

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans