Old zip files in /core/packages for modx--> "package management"

hi modexers

once we have a site built and the extras are installed and working, can we remove the zip files from /core/packages ? examples:

core.transport.zip
formit-4.2.7-pl.transport.zip
getresources-1.7.0-pl.transport.zip
if-1.1.1-pl.transport.zip
tinymcerte-2.0.7-pl.transport.zip

we are not removing the “extra” folder in /core/packages , just the zip files. There is a lot of drive space used up storing those zip files. thanks in advance.

[[modx2.8.4]]

@modx829392 I know this is an old post, but just came across it. If you want to purge the old Extra packages (ZIP and unzipped directories) you can use the Purge Old Packages button within package management.

There’s nothing wrong with deleting the ZIP files directly, the button just ensures you don’t accidentally delete something you shouldn’t

thanks for the update. i pressed that button (i’d say i did it before too) and none of the zip file in /core/packages/ are deleted. i am on “MODX Revolution 2.8.5-pl (traditional)”. but it’s still ok to just delete the zip files ( e.g. ace-1.9.3-pl.transport.zip or getresources-1.7.0-pl.transport.zip) in /core/packages/ but don’t delete the folders as that is where the actual installed extra is installed?

I believe the “Purge Old Packages” keeps the currently installed version of each package and only deletes previously installed versions.

The code from the extras that is used by MODX is actually in the folders core/components and assets/components. I think the data in core/packages/ is only there, so that you can “Reinstall” the package.

thanks @halftrainedharry . so we could technically remove all folders and files inside /core/packages/ - and if we need to reinstall an extra we will just install the latest code? do you lave your /core/packages/ folders alone or do you keep them empty?

I leave it alone.

These few megabytes of data is not a big deal.
And sometimes it’s advantageous to have the exact version of the transport package at hand, that is installed on the system.

If you really feel the need to save drive space, then I’d rather keep the zip-files than the extracted folders.

thanks @halftrainedharry

When you install a package, any data overwritten by the package installation is recorded in the extracted directory. This is used to restore that data if you uninstall that specific package version. Therefore, I recommend keeping the extracted directory rather than the zip.

2 Likes

thnaks. which is the “extracted directory”? /core/packages/ , core/components or assets/components?

Both, core/components/ holds the logic scripts that should not be accessible to the outside world i.e. PHP files. While assets/components/ holds the extras assets like CSS, JS, and even a connector.php for routing requests to processors.

I was referring to the extracted contents of the zip file in core/packages/. There will sometimes be a preserved.php file inside the extracted package directory, e.g. core/packages/gallery-1.7.1-pl/preserved.php.