deletePubspec method
Delete specified file
Implementation
void deletePubspec({required String targetPath}) {
try {
File(targetPath).deleteSync();
} catch (exception) {
stderr.writeln("Couldn't restore main pubspec.yaml");
stderr.writeln(exception);
}
}