Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How delete a specific ...
Finance forum
Answered

How delete a specific model/package?

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?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How delete a specific model/package?

    Hi All,

    ModelUtil.Exe delete method only delete Model file of package. the package is still shown on packagesLocalDirectory folder.

    To delete package completely:

    1- Stop IIS.(Aos machine)

    2- Stop DynamicsAXBatch service on Task manager

    3- Delete your package completely located on K:\AosService\packagesLocalDirectory (path can bey vary)

    4-Open VS

    5- Dynamics 365 --> Model management --> Refresh models

  • Suggested answer
    RE: How delete a specific model/package?

    This looks like different question. Can you please ask it as a new one. Also, to tell answer in short you need to have changeset details, when you checked in the HOTFIX changes to VSTS. May be through that changeset you can compare the code and remove the code related to HOTFIX.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How delete a specific model/package?

    Hello All,

    I see that you are talking about deleting a specific model/package that had been installed.  But how about deleting a hotfix that was installed.  Coz in the case of hotfix, there is not one clear model/package folder.  ALl you know from the "view installed hotfixes" screen is that the hotfix went into ApplicationSuite Package.  

    Please advise if any of you found a way to do this.  And i am talking of non-PROD scenario, so I have access to ModelUtil.exe.

    Thanks,

    Raghu.

  • Suggested answer
    RE: How delete a specific model/package?

    Assuming that the package should be deleted from UAT/LIVE

    1. Delete all the components from package and create deployable package out of it from DEV using VS.

    2. Create a text file call “ModuleToRemove.txt” and put it into the AOSService\Scripts folder

    3. In the text file, put in the name of the module you want to remove, for example – “MyModule”

    4. Zip up the package and upload into the asset library

    5. Apply the package in UAT/LIVE.

  • FahadAhmed Profile Picture
    FahadAhmed 205 on at
    RE: How delete a specific model/package?

    Hi All - I posted the answer on the orignal thread. community.dynamics.com/.../243141

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,263 Super User 2024 Season 2 on at
    RE: How delete a specific model/package?

    Hi Fahad,

    Did you also create a new question on the forum? Please don't duplicate your posts. This is the link to the new question from Fahad: community.dynamics.com/.../243141.

  • Uzair Saleem Profile Picture
    Uzair Saleem 131 on at
    RE: How delete a specific model/package?

    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

  • FahadAhmed Profile Picture
    FahadAhmed 205 on at
    RE: How delete a specific model/package?

    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

  • Suggested answer
    Uzair Saleem Profile Picture
    Uzair Saleem 131 on at
    RE: How delete a specific model/package?

    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.

  • Pyaarey Profile Picture
    Pyaarey 47 on at
    RE: How delete a specific model/package?

    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).

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans