The database files can be shrunk manually, either as a group or individually, or the database can be set to shrink automatically at specified intervals.Files are always shrunk from the end.
For example-
if you have a 5-GB file and specify 4 GB as the target_size in a DBCC SHRINKFILE statement,
the Database Engine will free as much space as it can from the last 1 GB of the file
You can perform this operation via some third party tool like this