Table Partitioning. What is the correct process for deleting .ndf and .ldf files? Please go easy it’s a steep learn curve..

OK steps done so far


Create files,
Create file groups,
Create partition function,
Create partition scheme,
Partition table associate files with filegroups
Put data in the table.


All is good

Now to reverse 

The drop data


Drop the partition and associations,
Drop partition scheme,
Drop partition function, 
Drop file groups


But when I deleted the files from the folder in my SSMS, I than had problems validating my Databases.

I restored the files and SSMS is fine.

My question what is the correct process for deleting .ndf  and .ldf files?
You can't delete the LDF file: it's essential.

For the NDF, you need to show that it's not used to SQL Server. You'd use DBCC SHRINKFILE with EMPTYFILE. Substitute xxx based on sys.database_files

DBCC SHRINKFILE (xx, EMPTYFILE)