Nov 3 · 2 min read

Before starting new package creation you should clean your dev org from all unnecessary salesforce component like : custom fields, links, page layouts and more.
Do not all namespace to the org before delete all custom components.
TL;DR;
Package Link : https://4winds.link/cleanOrgFiles
Deploy :
using sfdx:
sfdx force:mdapi:deploy -f deleteAll.zip -u <User/Alias> -w 10using workbench:

What include in the file:
- package.xml : 4 layouts for remove the dependency of custom links on the layouts
- destructiveChangesPost.xml : all unnecessary component to be delete, full list is below.
Full component to be delete list
CustomField
- Account.UpsellOpportunity__c
- Account.SLASerialNumber__c
- Account.Active__c
- Account.NumberofLocations__c
- Account.CustomerPriority__c
- Account.SLA__c
- Account.SLAExpirationDate__c
- Case.PotentialLiability__c
- Case.Product__c
- Case.SLAViolation__c
- Case.EngineeringReqNumber__c
- Contact.Level__c
- Contact.Languages__c
- Lead.SICCode__c
- Lead.Primary__c
- Lead.CurrentGenerators__c
- Lead.NumberofLocations__c
- Lead.ProductInterest__c
- Opportunity.CurrentGenerators__c
- Opportunity.OrderNumber__c
- Opportunity.TrackingNumber__c
- Opportunity.DeliveryInstallationStatus__c
- Opportunity.MainCompetitors__c
AssignmentRule
- Case.Standard
- Lead.Standard
EscalationRule
1.Case.Standard
HomePageLayout
1.DE Default
Layout
- Account-Account %28Marketing%29 Layout
- Account-Account %28Sales%29 Layout
- Account-Account %28Support%29 Layout
- Case-Case %28Marketing%29 Layout
- Case-Case %28Sales%29 Layout
- Case-Case %28Support%29 Layout
- Contact-Contact %28Marketing%29 Layout
- Contact-Contact %28Sales%29 Layout
- Contact-Contact %28Support%29 Layout
- Lead-Lead %28Marketing%29 Layout
- Lead-Lead %28Sales%29 Layout
- Lead-Lead %28Support%29 Layout
- Opportunity-Opportunity %28Marketing%29 Layout
- Opportunity-Opportunity %28Sales%29 Layout
- Opportunity-Opportunity %28Support%29 Layout
Profile
- Custom%3A Marketing Profile
- Custom%3A Sales Profile
- Custom%3A Support Profile
RemoteSiteSetting
- ApexDevNet
WebLink
- Account.Billing
- Campaign.ViewCampaignInfluenceReport
- Case.UpsellCrosssellOpportunity
- Opportunity.DeliveryStatus
Please update me for any New/Update/Missing component.
