public void delete() {
        if (getInstalledDirectory() != null && getInstalledDirectory().exists()) {
            try {
                FileUtils.deleteDirectory(getInstalledDirectory());
            } catch (IOException ex) {
                Utils.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
            }
        }

        File assets = new File(directories.getAssetsDirectory(), getName());
        if (assets.exists()) {
            try {
                FileUtils.deleteDirectory(assets);
            } catch (IOException ex) {
                Utils.getLogger().log(Level.SEVERE, ex.getMessage(), ex);
            }
        }

        installedPackRepository.remove(getName());
        installedPack = null;
        installedDirectory = null;
    }